mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 23:21:02 +00:00
Stop sending messages on legacy substream altogether (#6975)
* Stop sending messages on legacy substream altogether * Ensure that handshake is sent back even in case of back-pressure * Update client/network/src/protocol/generic_proto/handler/group.rs Co-authored-by: Max Inden <mail@max-inden.de> * Also process OpenRequest and Closed * Also process OpenRequest and Closed * Fix bad merge * God I'm so lost with all these merges * Immediately return Closed * Add warning for sending on non-registered protocol * Register GrandPa protocol in tests * Update client/network/src/protocol/generic_proto/handler/group.rs Co-authored-by: Max Inden <mail@max-inden.de> Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@@ -23,7 +23,7 @@ use assert_matches::assert_matches;
|
||||
use environment::HasVoted;
|
||||
use sc_network_test::{
|
||||
Block, BlockImportAdapter, Hash, PassThroughVerifier, Peer, PeersClient, PeersFullClient,
|
||||
TestClient, TestNetFactory,
|
||||
TestClient, TestNetFactory, FullPeerConfig,
|
||||
};
|
||||
use sc_network::config::{ProtocolConfig, BoxFinalityProofRequestBuilder};
|
||||
use parking_lot::Mutex;
|
||||
@@ -94,6 +94,15 @@ impl TestNetFactory for GrandpaTestNet {
|
||||
ProtocolConfig::default()
|
||||
}
|
||||
|
||||
fn add_full_peer(&mut self) {
|
||||
self.add_full_peer_with_config(FullPeerConfig {
|
||||
notifications_protocols: vec![
|
||||
(communication::GRANDPA_ENGINE_ID, communication::GRANDPA_PROTOCOL_NAME.into())
|
||||
],
|
||||
..Default::default()
|
||||
})
|
||||
}
|
||||
|
||||
fn make_verifier(
|
||||
&self,
|
||||
_client: PeersClient,
|
||||
|
||||
Reference in New Issue
Block a user