mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +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
@@ -26,7 +26,7 @@ use polkadot_node_network_protocol::request_response::{
|
||||
use polkadot_node_primitives::PoV;
|
||||
use polkadot_node_subsystem::{
|
||||
jaeger,
|
||||
messages::{IfDisconnected, NetworkBridgeMessage},
|
||||
messages::{IfDisconnected, NetworkBridgeTxMessage},
|
||||
overseer,
|
||||
};
|
||||
use polkadot_node_subsystem_util::runtime::RuntimeInfo;
|
||||
@@ -62,7 +62,7 @@ pub async fn fetch_pov<Context>(
|
||||
);
|
||||
let full_req = Requests::PoVFetchingV1(req);
|
||||
|
||||
ctx.send_message(NetworkBridgeMessage::SendRequests(
|
||||
ctx.send_message(NetworkBridgeTxMessage::SendRequests(
|
||||
vec![full_req],
|
||||
IfDisconnected::ImmediateError,
|
||||
))
|
||||
@@ -195,7 +195,10 @@ mod tests {
|
||||
)) => {
|
||||
tx.send(Ok(Some(make_session_info()))).unwrap();
|
||||
},
|
||||
AllMessages::NetworkBridge(NetworkBridgeMessage::SendRequests(mut reqs, _)) => {
|
||||
AllMessages::NetworkBridgeTx(NetworkBridgeTxMessage::SendRequests(
|
||||
mut reqs,
|
||||
_,
|
||||
)) => {
|
||||
let req = assert_matches!(
|
||||
reqs.pop(),
|
||||
Some(Requests::PoVFetchingV1(outgoing)) => {outgoing}
|
||||
|
||||
Reference in New Issue
Block a user