diff options
author | Ava Chow <github@achow101.com> | 2024-01-16 16:36:14 -0500 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-01-16 16:50:03 -0500 |
commit | 8106b268cde8e97a7c330afdda39b6bb55e5574a (patch) | |
tree | 520ccd833a23d345853ec6413171bd1f4867b642 /test/functional | |
parent | a3fb1f80ac38825ed840d29467b4411c02ee2d7f (diff) | |
parent | 3ba815b42db74804e341ce15f648c2b297af55ca (diff) |
Merge bitcoin/bitcoin#29239: rpc: Make v2transport default for addnode RPC when enabled
3ba815b42db74804e341ce15f648c2b297af55ca Make v2transport default for addnode RPC when enabled (Pieter Wuille)
Pull request description:
Since #29058, several types of manually configured connections will attempt v2 connections when `-v2transport` is enabled, except for the `addnode` RPC, as that one has an explicit argument to enable or disable.
Make the default for that RPC match the `-v2transport` setting so the behavior matches that of other manual connections from a user perspective.
ACKs for top commit:
achow101:
ACK 3ba815b42db74804e341ce15f648c2b297af55ca
kristapsk:
ACK 3ba815b42db74804e341ce15f648c2b297af55ca
theStack:
Code-review ACK 3ba815b42db74804e341ce15f648c2b297af55ca
Tree-SHA512: 31ef48cf1e533abb17866020378c004df929e626074dc98b3229fb60a66de58435e95c8fda8d1b463e1208aa39d1f42d239818e7e58595a3738089920598befc
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 0ee332b75b..4baf12c3f9 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -602,10 +602,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): if peer_advertises_v2 is None: peer_advertises_v2 = from_connection.use_v2transport - if peer_advertises_v2: - from_connection.addnode(node=ip_port, command="onetry", v2transport=True) + if peer_advertises_v2 != from_connection.use_v2transport: + from_connection.addnode(node=ip_port, command="onetry", v2transport=peer_advertises_v2) else: - # skip the optional third argument (default false) for + # skip the optional third argument if it matches the default, for # compatibility with older clients from_connection.addnode(ip_port, "onetry") |