mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 11:38:01 +00:00
split NetworkBridge into two subsystems (#5616)
* foo * rolling session window * fixup * remove use statemetn * fmt * split NetworkBridge into two subsystems Pending cleanup * split * chore: reexport OrchestraError as OverseerError * chore: silence warnings * fixup tests * chore: add default timenout of 30s to subsystem test helper ctx handle * single item channel * fixins * fmt * cleanup * remove dead code * remove sync bounds again * wire up shared state * deal with some FIXMEs * use distinct tags Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> * use tag Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> * address naming tx and rx are common in networking and also have an implicit meaning regarding networking compared to incoming and outgoing which are already used with subsystems themselvesq * remove unused sync oracle * remove unneeded state * fix tests * chore: fmt * do not try to register twice * leak Metrics type Co-authored-by: Andrei Sandu <54316454+sandreim@users.noreply.github.com> Co-authored-by: Andronik <write@reusable.software>
This commit is contained in:
committed by
GitHub
parent
c11c1f38f4
commit
3240cb5e4d
@@ -22,7 +22,7 @@
|
||||
//! which limits the amount of messages sent and received
|
||||
//! to be an order of sqrt of the validators. Our neighbors
|
||||
//! in this graph will be forwarded to the network bridge with
|
||||
//! the `NetworkBridgeMessage::NewGossipTopology` message.
|
||||
//! the `NetworkBridgeRxMessage::NewGossipTopology` message.
|
||||
|
||||
use std::{
|
||||
collections::{HashMap, HashSet},
|
||||
@@ -45,8 +45,8 @@ use polkadot_node_network_protocol::{
|
||||
};
|
||||
use polkadot_node_subsystem::{
|
||||
messages::{
|
||||
GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeMessage, RuntimeApiMessage,
|
||||
RuntimeApiRequest,
|
||||
GossipSupportMessage, NetworkBridgeEvent, NetworkBridgeRxMessage, NetworkBridgeTxMessage,
|
||||
RuntimeApiMessage, RuntimeApiRequest,
|
||||
},
|
||||
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
|
||||
};
|
||||
@@ -345,7 +345,7 @@ where
|
||||
gum::debug!(target: LOG_TARGET, %num, "Issuing a connection request");
|
||||
|
||||
sender
|
||||
.send_message(NetworkBridgeMessage::ConnectToResolvedValidators {
|
||||
.send_message(NetworkBridgeTxMessage::ConnectToResolvedValidators {
|
||||
validator_addrs,
|
||||
peer_set: PeerSet::Validation,
|
||||
})
|
||||
@@ -545,7 +545,7 @@ async fn update_gossip_topology(
|
||||
.collect();
|
||||
|
||||
sender
|
||||
.send_message(NetworkBridgeMessage::NewGossipTopology {
|
||||
.send_message(NetworkBridgeRxMessage::NewGossipTopology {
|
||||
session: session_index,
|
||||
our_neighbors_x: row_neighbors,
|
||||
our_neighbors_y: column_neighbors,
|
||||
|
||||
Reference in New Issue
Block a user