diff options
author | stratospher <44024636+stratospher@users.noreply.github.com> | 2022-02-05 23:49:47 +0530 |
---|---|---|
committer | stratospher <44024636+stratospher@users.noreply.github.com> | 2024-01-25 11:10:50 +0530 |
commit | 8c054aa04d33b247744b3747cd5bf3005a013e90 (patch) | |
tree | 27655d7f06922f403c5c3b34b149e7882b046e5c /test/functional/rpc_net.py | |
parent | 382894c3acd2dbf3e4198814f547c75b6fb17706 (diff) | |
download | bitcoin-8c054aa04d33b247744b3747cd5bf3005a013e90.tar.xz |
[test] Allow inbound and outbound connections supporting v2 P2P protocol
- Add an optional `supports_v2_p2p` parameter to specify if the inbound
and outbound connections support v2 P2P protocol.
- In the `addconnection_callback` which gets called when creating
outbound connections, call the `addconnection` RPC with v2 P2P protocol
support enabled.
Diffstat (limited to 'test/functional/rpc_net.py')
-rwxr-xr-x | test/functional/rpc_net.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py index b193ffd462..537744fea7 100755 --- a/test/functional/rpc_net.py +++ b/test/functional/rpc_net.py @@ -241,7 +241,10 @@ class NetTest(BitcoinTestFramework): def test_service_flags(self): self.log.info("Test service flags") self.nodes[0].add_p2p_connection(P2PInterface(), services=(1 << 4) | (1 << 63)) - assert_equal(['UNKNOWN[2^4]', 'UNKNOWN[2^63]'], self.nodes[0].getpeerinfo()[-1]['servicesnames']) + if self.options.v2transport: + assert_equal(['UNKNOWN[2^4]', 'P2P_V2', 'UNKNOWN[2^63]'], self.nodes[0].getpeerinfo()[-1]['servicesnames']) + else: + assert_equal(['UNKNOWN[2^4]', 'UNKNOWN[2^63]'], self.nodes[0].getpeerinfo()[-1]['servicesnames']) self.nodes[0].disconnect_p2ps() def test_getnodeaddresses(self): |