Skip to content

Commit

Permalink
Add warning when peer_id is not available when building topology (#2140)
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>
Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
alexggh and bkchr authored Nov 6, 2023
1 parent 305aefc commit fb2dc6d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 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,15 @@ 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::debug!(
target: LOG_TARGET,
?validator_index,
"Could not determine peer_id for validator, let the team know in \n
https://github.com/paritytech/polkadot-sdk/issues/2138"
)
}
peers.push(TopologyPeerInfo {
peer_ids: addr.into_iter().collect(),
validator_index,
Expand Down

0 comments on commit fb2dc6d

Please sign in to comment.