docs(exex): sync hello-world notifications loop with code (#20403)

This commit is contained in:
sashass1315
2025-12-16 10:39:45 +02:00
committed by GitHub
parent 40e8241bf5
commit 7eef092110

View File

@@ -73,7 +73,7 @@ Now, let's extend our simplest ExEx and start actually listening to new notifica
Woah, there's a lot of new stuff here! Let's go through it step by step:
- First, we've added a `while let Some(notification) = ctx.notifications.recv().await` loop that waits for new notifications to come in.
- First, we've added a `while let Some(notification) = ctx.notifications.try_next().await?` loop that waits for new notifications to come in.
- The main node is responsible for sending notifications to the ExEx, so we're waiting for them to come in.
- Next, we've added a `match &notification { ... }` block that matches on the type of the notification.
- In each case, we're logging the notification and the corresponding block range, be it a chain commit, revert, or reorg.