mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 21:01:05 +00:00
Evict inactive peers from the collator protocol peer-set (#2680)
* malicious reputation cost is fatal * make ReportBad a malicious cost * futures control-flow for cleaning up inactive collator peers * guide: network bridge updates * add `PeerDisconnected` message * guide: update * reverse order * remember to match * implement disconnect peer in network bridge * implement disconnect_inactive_peers * test * remove println * don't hardcore policy * add fuse outside of loop * use default eviction policy
This commit is contained in:
committed by
GitHub
parent
0f8b6f2f6e
commit
b8867d71bc
@@ -297,6 +297,16 @@ where
|
||||
bridge.network_service.report_peer(peer, rep).await?
|
||||
}
|
||||
|
||||
Action::DisconnectPeer(peer, peer_set) => {
|
||||
tracing::debug!(
|
||||
target: LOG_TARGET,
|
||||
action = "DisconnectPeer",
|
||||
?peer,
|
||||
peer_set = ?peer_set,
|
||||
);
|
||||
bridge.network_service.disconnect_peer(peer, peer_set);
|
||||
}
|
||||
|
||||
Action::ActiveLeaves(ActiveLeavesUpdate { activated, deactivated }) => {
|
||||
tracing::debug!(
|
||||
target: LOG_TARGET,
|
||||
|
||||
Reference in New Issue
Block a user