mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 04:45:42 +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:
@@ -139,6 +139,10 @@ impl<B> Validator<B> for GossipValidator<B>
|
||||
where
|
||||
B: Block,
|
||||
{
|
||||
fn peer_disconnected(&self, _context: &mut dyn ValidatorContext<B>, who: &PeerId) {
|
||||
self.known_peers.lock().remove(who);
|
||||
}
|
||||
|
||||
fn validate(
|
||||
&self,
|
||||
_context: &mut dyn ValidatorContext<B>,
|
||||
|
||||
Reference in New Issue
Block a user