Skip to content

Commit

Permalink
Add warning when peer_id is not available when building topology
Browse files Browse the repository at this point in the history
... see #2138 for why
is not good, until we fix it let's add a warning to understand if this
is happening in the wild.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh committed Nov 2, 2023
1 parent e1c033e commit 463bde0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions polkadot/node/network/bridge/src/rx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,14 @@ where
let mut peers = Vec::with_capacity(neighbors.len());
for (discovery_id, validator_index) in neighbors {
let addr = get_peer_id_by_authority_id(ads, discovery_id.clone()).await;
if addr.is_none() {
// See on why is not good in https://github.com/paritytech/polkadot-sdk/issues/2138
gum::warn!(
target: LOG_TARGET,
?validator_index,
"Could not determine peer_id for validator"
)
}
peers.push(TopologyPeerInfo {
peer_ids: addr.into_iter().collect(),
validator_index,
Expand Down

0 comments on commit 463bde0

Please sign in to comment.