sc-consensus-beefy: fix on-demand async state machine (#13599)
`futures_util::pending!()` macro only yields to the event loop once,
resulting in many calls to the `OnDemandJustificationsEngine::next()`
made by the tokio reactor even though the on-demand-engine is idle.
Replace it with the correct `futures::future::pending::<()>()` function
which forever yields to the event loop, which is what we want when
the engine is idle.
Signed-off-by:
Adrian Catangiu <adrian@parity.io>
Showing
- substrate/client/consensus/beefy/src/communication/request_response/outgoing_requests_engine.rs 1 addition, 1 deletion...ommunication/request_response/outgoing_requests_engine.rs
- substrate/client/consensus/beefy/src/tests.rs 15 additions, 8 deletionssubstrate/client/consensus/beefy/src/tests.rs
- substrate/client/consensus/beefy/src/worker.rs 5 additions, 5 deletionssubstrate/client/consensus/beefy/src/worker.rs
Please register or sign in to comment