Skip to content

Commit 3ebde21

Browse files
committed
[test] Fix wait condition in disconnect_p2ps
MY_SUBVERSION is defined in messages.py as a byte string, but here we were comparing this value to the value returned by the RPC. Convert to ensure the types match.
1 parent e2ff5e7 commit 3ebde21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def add_p2p_connection(self, p2p_conn, *, wait_for_verack=True, **kwargs):
544544

545545
def num_test_p2p_connections(self):
546546
"""Return number of test framework p2p connections to the node."""
547-
return len([peer for peer in self.getpeerinfo() if peer['subver'] == MY_SUBVERSION])
547+
return len([peer for peer in self.getpeerinfo() if peer['subver'] == MY_SUBVERSION.decode("utf-8")])
548548

549549
def disconnect_p2ps(self):
550550
"""Close all p2p connections to the node."""

0 commit comments

Comments
 (0)