mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
merge bitcoin#29460: assert rpc error for addnode v2transport not enabled
This commit is contained in:
parent
5ee15faba0
commit
bd2fe6103d
@ -12,6 +12,7 @@ from test_framework.test_framework import BitcoinTestFramework
|
|||||||
from test_framework.util import (
|
from test_framework.util import (
|
||||||
assert_equal,
|
assert_equal,
|
||||||
p2p_port,
|
p2p_port,
|
||||||
|
assert_raises_rpc_error
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -59,6 +60,11 @@ class V2TransportTest(BitcoinTestFramework):
|
|||||||
# V1 nodes can sync with each other
|
# V1 nodes can sync with each other
|
||||||
assert_equal(self.nodes[2].getblockcount(), 0)
|
assert_equal(self.nodes[2].getblockcount(), 0)
|
||||||
assert_equal(self.nodes[3].getblockcount(), 0)
|
assert_equal(self.nodes[3].getblockcount(), 0)
|
||||||
|
|
||||||
|
# addnode rpc error when v2transport requested but not enabled
|
||||||
|
ip_port = "127.0.0.1:{}".format(p2p_port(3))
|
||||||
|
assert_raises_rpc_error(-8, "Error: v2transport requested but not enabled (see -v2transport)", self.nodes[2].addnode, node=ip_port, command='add', v2transport=True)
|
||||||
|
|
||||||
with self.nodes[2].assert_debug_log(expected_msgs=[],
|
with self.nodes[2].assert_debug_log(expected_msgs=[],
|
||||||
unexpected_msgs=[sending_handshake, downgrading_to_v1]):
|
unexpected_msgs=[sending_handshake, downgrading_to_v1]):
|
||||||
self.connect_nodes(2, 3, peer_advertises_v2=False)
|
self.connect_nodes(2, 3, peer_advertises_v2=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user