Skip to content

Commit

Permalink
update book
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Sep 3, 2024
1 parent 83cfcc1 commit 689e538
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions book/developers/exex/hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ use reth_node_ethereum::EthereumNode;
use reth_tracing::tracing::info;
async fn my_exex<Node: FullNodeComponents>(mut ctx: ExExContext<Node>) -> eyre::Result<()> {
let notifications = ctx.notifications.subscribe();
while let Some(notification) = notifications.recv().await {
let mut notifications = ctx.notifications.subscribe();
while let Some(notification) = notifications.next().await {
match &notification {
ExExNotification::ChainCommitted { new } => {
info!(committed_chain = ?new.range(), "Received commit");
Expand Down
2 changes: 1 addition & 1 deletion book/developers/exex/tracking-state.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl<Node: FullNodeComponents> Future for MyExEx<Node> {
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
let this = self.get_mut();
while let Some(notification) = ready!(this.notifications.poll_recv(cx)) {
while let Some(notification) = ready!(this.notifications.poll_next_unpin(cx)) {
match &notification {
ExExNotification::ChainCommitted { new } => {
info!(committed_chain = ?new.range(), "Received commit");
Expand Down

0 comments on commit 689e538

Please sign in to comment.