Skip to content

♻️ Streaming node state #1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft

♻️ Streaming node state #1535

wants to merge 9 commits into from

Conversation

wraitii
Copy link
Member

@wraitii wraitii commented Aug 13, 2025

No description provided.

fn on_event(&mut self, event: &TxEvent);
}

pub struct BlockNodeStateCallback {
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi ne pas l'implémenter directement sur Block, orphan rule again ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ça m'était juste pas venu à l'idée. En soit c'est temporaire, je vais voir si je rechange.

Ok(())
}

pub fn handle_signed_block(&mut self, signed_block: &SignedBlock) -> Result<Block> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi store un truc stateful ? On pourrait générer le block dans la fonction directement non ?

Copy link
Member Author

@wraitii wraitii Aug 19, 2025

Choose a reason for hiding this comment

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

J'ai fait comme ça parce que ça me paraissait potentiellement plus facile que de passer le truc en argument partout, mais ça se débat en vrai

ContractTimeoutWindowUpdated(&'a TxId, &'a ContractName, &'a TimeoutWindow),
}

pub trait NodeStateCallback: std::any::Any {
Copy link
Contributor

@hhalex hhalex Aug 18, 2025

Choose a reason for hiding this comment

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

NodeStateInterpreter ? (Callback ça évoque un truc asynchrone)

Copy link
Member Author

Choose a reason for hiding this comment

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

Toutes façons cette struct est temporaire, mais ui

@wraitii wraitii force-pushed the streaming_node_state branch 3 times, most recently from f47436b to 4ca5b62 Compare August 21, 2025 13:47
@wraitii wraitii force-pushed the streaming_node_state branch from 2868363 to 82c258f Compare August 22, 2025 15:05
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.

2 participants