-
Notifications
You must be signed in to change notification settings - Fork 27
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
Mempool rpc events #1807
Mempool rpc events #1807
Conversation
/// Subscribe to events emitted by mempool subsystem | ||
fn subscribe_to_subsystem_events(&mut self, handler: Arc<dyn Fn(MempoolEvent) + Send + Sync>); | ||
|
||
/// Subscribe to broadcast mempool events | ||
fn subscribe_to_rpc_events(&mut self) -> utils_networking::broadcaster::Receiver<MempoolEvent>; |
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.
I don't think the naming is adequate here, because these 2 functions subscribe to exactly the same events, only the mechanism differ.
The names of the corresponsing methods of Mempool
- subscribe_to_events
and subscribe_to_event_broadcast
- sound better.
(I'd still rename the latter though, e.g. to subscribe_to_events_via_broadcaster or something like that)
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.
Not sure. This is literally reverting changes from #1501. Though I agree that these events aren't subsystem's or rpc's. subscribe_to_events_subsystem
?
e519c76
to
887c67e
Compare
Allows to subscribe to mempool event over websocket