mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
Add NetworkBridgeEvent::UpdatedAuthorityIds (#6227)
* Add NetworkBridgeEvent::UpdatedAuthorityIds * update collator * informing subsystems * remove outdated authority data * docs * remove accidentally added line * update docs * emit event on session change * emit * check for update and update * Update node/network/gossip-support/src/lib.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/approval-distribution/src/lib.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/bitfield-distribution/src/lib.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/bridge/src/rx/mod.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/collator-protocol/src/validator_side/mod.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/collator-protocol/src/collator_side/mod.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/bridge/src/rx/mod.rs Co-authored-by: Andronik <write@reusable.software> * Update node/subsystem-types/src/messages.rs Co-authored-by: Andronik <write@reusable.software> * Update node/subsystem-types/src/messages.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/statement-distribution/src/lib.rs Co-authored-by: Andronik <write@reusable.software> * Update node/network/statement-distribution/src/lib.rs Co-authored-by: Andronik <write@reusable.software> * Update node/subsystem-types/src/messages/network_bridge_event.rs Co-authored-by: Andronik <write@reusable.software> * Update node/subsystem-types/src/messages.rs Co-authored-by: Andronik <write@reusable.software> * fixes * merge fixes * make clippy happy again * fix --------- Co-authored-by: Andronik <write@reusable.software>
This commit is contained in:
@@ -371,7 +371,7 @@ where
|
||||
Ok(v) => v,
|
||||
};
|
||||
|
||||
// non-decoded, but version-checked colldation messages.
|
||||
// non-decoded, but version-checked collation messages.
|
||||
let c_messages: Result<Vec<_>, _> = messages
|
||||
.iter()
|
||||
.filter_map(|(protocol, msg_bytes)| {
|
||||
@@ -555,6 +555,27 @@ where
|
||||
ctx.sender(),
|
||||
);
|
||||
},
|
||||
FromOrchestra::Communication {
|
||||
msg: NetworkBridgeRxMessage::UpdatedAuthorityIds { peer_id, authority_ids },
|
||||
} => {
|
||||
gum::debug!(
|
||||
target: LOG_TARGET,
|
||||
action = "UpdatedAuthorityIds",
|
||||
?peer_id,
|
||||
?authority_ids,
|
||||
"`AuthorityDiscoveryId`s have changed",
|
||||
);
|
||||
// using unbounded send to avoid cycles
|
||||
// the messages are sent only once per session up to one per peer
|
||||
dispatch_collation_event_to_all_unbounded(
|
||||
NetworkBridgeEvent::UpdatedAuthorityIds(peer_id, authority_ids.clone()),
|
||||
ctx.sender(),
|
||||
);
|
||||
dispatch_validation_event_to_all_unbounded(
|
||||
NetworkBridgeEvent::UpdatedAuthorityIds(peer_id, authority_ids),
|
||||
ctx.sender(),
|
||||
);
|
||||
},
|
||||
FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()),
|
||||
FromOrchestra::Signal(OverseerSignal::ActiveLeaves(active_leaves)) => {
|
||||
let ActiveLeavesUpdate { activated, deactivated } = active_leaves;
|
||||
|
||||
Reference in New Issue
Block a user