Skip to content

Commit c709df7

Browse files
committed
merge bitcoin#20524: Move MIN_VERSION_SUPPORTED to p2p.py
continuation of cbff29a (dash#6067)
1 parent 5903fb7 commit c709df7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/functional/test_framework/test_node.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from .p2p import P2P_SUBVERSION
2828
from .util import (
2929
MAX_NODES,
30+
assert_equal,
3031
append_config,
3132
delete_cookie_file,
3233
get_auth_cookie,
@@ -637,6 +638,11 @@ def add_p2p_connection(self, p2p_conn, *, wait_for_verack=True, **kwargs):
637638
# in comparison to the upside of making tests less fragile and unexpected intermittent errors less likely.
638639
p2p_conn.sync_with_ping()
639640

641+
# Consistency check that the Dash Core has received our user agent string. This checks the
642+
# node's newest peer. It could be racy if another Dash Core node has connected since we opened
643+
# our connection, but we don't expect that to happen.
644+
assert_equal(self.getpeerinfo()[-1]['subver'], p2p_conn.strSubVer)
645+
640646
return p2p_conn
641647

642648
def add_outbound_p2p_connection(self, p2p_conn, *, p2p_idx, connection_type="outbound-full-relay", **kwargs):

0 commit comments

Comments
 (0)