-
Notifications
You must be signed in to change notification settings - Fork 49
♻️ 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
base: main
Are you sure you want to change the base?
♻️ Streaming node state #1535
Conversation
fn on_event(&mut self, event: &TxEvent); | ||
} | ||
|
||
pub struct BlockNodeStateCallback { |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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> { |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
f47436b
to
4ca5b62
Compare
2868363
to
82c258f
Compare
No description provided.