mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: ExExEvent::FinishedHeight takes BlockNumHash instead (#11278)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
This commit is contained in:
@ -125,7 +125,7 @@ async fn my_exex<Node: FullNodeComponents>(mut ctx: ExExContext<Node>) -> eyre::
|
||||
|
||||
if let Some(committed_chain) = notification.committed_chain() {
|
||||
ctx.events
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,4 +23,4 @@ event to signify what blocks have been processed. This event is used by Reth to
|
||||
|
||||
An ExEx will only receive notifications for block numbers greater than the block in the most recently emitted `FinishedHeight` event.
|
||||
|
||||
To clarify: if an ExEx emits `ExExEvent::FinishedHeight(0)` it will receive notifications for any `block_number > 0`.
|
||||
To clarify: if an ExEx emits `ExExEvent::FinishedHeight` for `block #0` it will receive notifications for any `block_number > 0`.
|
||||
|
||||
@ -279,7 +279,7 @@ async fn remote_exex<Node: FullNodeComponents>(
|
||||
while let Some(notification) = ctx.notifications.next().await {
|
||||
if let Some(committed_chain) = notification.committed_chain() {
|
||||
ctx.events
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
|
||||
}
|
||||
|
||||
info!("Notification sent to the gRPC server");
|
||||
@ -388,7 +388,7 @@ async fn remote_exex<Node: FullNodeComponents>(
|
||||
while let Some(notification) = ctx.notifications.next().await {
|
||||
if let Some(committed_chain) = notification.committed_chain() {
|
||||
ctx.events
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
|
||||
}
|
||||
|
||||
info!(?notification, "Notification sent to the gRPC server");
|
||||
|
||||
@ -57,7 +57,7 @@ impl<Node: FullNodeComponents> Future for MyExEx<Node> {
|
||||
if let Some(committed_chain) = notification.committed_chain() {
|
||||
this.ctx
|
||||
.events
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ impl<Node: FullNodeComponents> Future for MyExEx<Node> {
|
||||
|
||||
this.ctx
|
||||
.events
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().number))?;
|
||||
.send(ExExEvent::FinishedHeight(committed_chain.tip().num_hash()))?;
|
||||
}
|
||||
|
||||
if let Some(first_block) = this.first_block {
|
||||
|
||||
Reference in New Issue
Block a user