Skip to content

chore: restructured node#71

Open
jcabrero wants to merge 2 commits intofeat/erc_8004_validations_responsesfrom
chore/restructured_node
Open

chore: restructured node#71
jcabrero wants to merge 2 commits intofeat/erc_8004_validations_responsesfrom
chore/restructured_node

Conversation

@jcabrero
Copy link
Member

@jcabrero jcabrero commented Feb 5, 2026

Inspired by @mfontanini PR for the keeper, created this to simplify the structure of the blacklight-node and make it more readable.

  • It replaces tokio::Notify with a tokio_utils::cancellation_signal that should tell the node to interrupt the listening task. In this case it was working because there is always a listening for cancellation event and only once concurrent tokio::select! waiting for the cancellation signal. It would have worked with notify_once but I believe it is more solid using a cancellation signal in case the node was ever doing more than one listening event in parallel.
  • I created a supervisor module, which runs the main loop and is in charge of client reconnections in case of failures.
  • It has some functions to listen for events, and to process htxs. The rest of the functionality remains in the same places.

Copy link
Member

@jimouris jimouris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but didn't check too thoroughly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants