BABE slot and epoch event notifications (#6563)
* BabeWorker -> BabeSlotWorker * SlotWorker::notify_slot: similar to claim_slot, but called no matter authoring * Wrap the future with a new struct BabeWorker * Add type definition slot_notification_sinks * Function slot_notification_streams for the receiver side * Get a handle of slot_notification_sinks in BabeSlotWorker * Implement notify_slot * Switch to use bounded mpsc * Do not drop the sink when channel is full Only skip sending the message and emit a warning, because it is recoverable. * Fix future type bounds * Add must_use and sink type alias
Showing
- substrate/Cargo.lock 2 additions, 0 deletionssubstrate/Cargo.lock
- substrate/client/consensus/babe/Cargo.toml 2 additions, 0 deletionssubstrate/client/consensus/babe/Cargo.toml
- substrate/client/consensus/babe/src/lib.rs 77 additions, 10 deletionssubstrate/client/consensus/babe/src/lib.rs
- substrate/client/consensus/slots/src/lib.rs 11 additions, 0 deletionssubstrate/client/consensus/slots/src/lib.rs
Please register or sign in to comment