mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 18:01:03 +00:00
BEEFY: optimize voter event loop for fewer 'active' wakeups (#12760)
* client/beefy: remove high-freq network events from main loop Network events are many and very frequent, remove the net-event-stream from the main voter loop and drastically reduce BEEFY voter task 'wakeups'. Instead have the `GossipValidator` track known peers as it already has callbacks for that coming from `GossipEngine`. Signed-off-by: acatangiu <adrian@parity.io>
This commit is contained in:
@@ -241,11 +241,12 @@ where
|
||||
None,
|
||||
);
|
||||
|
||||
// The `GossipValidator` adds and removes known peers based on valid votes and network events.
|
||||
let on_demand_justifications = OnDemandJustificationsEngine::new(
|
||||
network.clone(),
|
||||
runtime.clone(),
|
||||
justifications_protocol_name,
|
||||
known_peers.clone(),
|
||||
known_peers,
|
||||
);
|
||||
|
||||
let metrics =
|
||||
@@ -286,7 +287,6 @@ where
|
||||
payload_provider,
|
||||
network,
|
||||
key_store: key_store.into(),
|
||||
known_peers,
|
||||
gossip_engine,
|
||||
gossip_validator,
|
||||
on_demand_justifications,
|
||||
|
||||
Reference in New Issue
Block a user