Skip to content

Commit 505510e

Browse files
committed
GH-1685 Verify peer_addr not empty
1 parent 7c43cbf commit 505510e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/auto_bp_gossip_peering_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,11 @@ def connectedPeers(nodeId, connectionsJson):
171171
continue
172172
peer_addr = conn["peer"]
173173
if len(peer_addr) == 0:
174-
if len(conn["last_handshake"]["p2p_address"]) == 0:
174+
if not conn["last_handshake"]["p2p_address"]:
175175
continue
176176
peer_addr = conn["last_handshake"]["p2p_address"].split()[0]
177+
if not peer_addr:
178+
continue
177179
if peer_names[peer_addr] != "bios" and peer_addr != getHostName(nodeId):
178180
if conn["is_bp_peer"]:
179181
peers.append(peer_names[peer_addr])

0 commit comments

Comments
 (0)