mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 02:17:58 +00:00
sc-beefy-consensus: Remove unneeded stream. (#4015)
The stream was just used to communicate from the validator the peer reports back to the gossip engine. Internally the gossip engine just forwards these reports to the networking engine. So, we can just do this directly. The reporting stream was also pumped [in the worker behind the engine](https://github.com/paritytech/polkadot-sdk/blob/9d6261892814fa27c97881c0321c008d7340b54b/substrate/client/consensus/beefy/src/worker.rs#L939). This means if there was a lot of data incoming over the engine, the reporting stream was almost never processed and thus, it could have started to grow and we have seen issues around this. Partly Closes: https://github.com/paritytech/polkadot-sdk/issues/3945
This commit is contained in:
@@ -23,8 +23,9 @@ use crate::{
|
||||
beefy_block_import_and_links,
|
||||
communication::{
|
||||
gossip::{
|
||||
proofs_topic, tests::sign_commitment, votes_topic, GossipFilterCfg, GossipMessage,
|
||||
GossipValidator,
|
||||
proofs_topic,
|
||||
tests::{sign_commitment, TestNetwork},
|
||||
votes_topic, GossipFilterCfg, GossipMessage, GossipValidator,
|
||||
},
|
||||
request_response::{on_demand_justifications_protocol_config, BeefyJustifsRequestHandler},
|
||||
},
|
||||
@@ -1450,7 +1451,7 @@ async fn gossipped_finality_proofs() {
|
||||
let charlie = &mut net.peers[2];
|
||||
let known_peers = Arc::new(Mutex::new(KnownPeers::<Block>::new()));
|
||||
// Charlie will run just the gossip engine and not the full voter.
|
||||
let (gossip_validator, _) = GossipValidator::new(known_peers);
|
||||
let gossip_validator = GossipValidator::new(known_peers, Arc::new(TestNetwork::new().0));
|
||||
let charlie_gossip_validator = Arc::new(gossip_validator);
|
||||
charlie_gossip_validator.update_filter(GossipFilterCfg::<Block> {
|
||||
start: 1,
|
||||
|
||||
Reference in New Issue
Block a user