mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 14:51:07 +00:00
Fix reliance on non-empty NodeInfo::endpoints (#8684)
* Use as_deref instead of .map in Node::client_version * Fix reliance on non-empty NodeInfo::endpoints
This commit is contained in:
committed by
GitHub
parent
06670046bc
commit
be1dce5618
@@ -550,7 +550,7 @@ impl<B: BlockT + 'static, H: ExHashT> NetworkWorker<B, H> {
|
||||
let known_addresses = NetworkBehaviour::addresses_of_peer(swarm.behaviour_mut(), peer_id)
|
||||
.into_iter().collect();
|
||||
|
||||
let endpoint = if let Some(e) = swarm.behaviour_mut().node(peer_id).map(|i| i.endpoint()) {
|
||||
let endpoint = if let Some(e) = swarm.behaviour_mut().node(peer_id).map(|i| i.endpoint()).flatten() {
|
||||
e.clone().into()
|
||||
} else {
|
||||
error!(target: "sub-libp2p", "Found state inconsistency between custom protocol \
|
||||
|
||||
Reference in New Issue
Block a user