mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
[rpc] Add connection type to getpeerinfo RPC, update tests
This commit is contained in:
@@ -175,6 +175,12 @@ class NetTest(BitcoinTestFramework):
|
||||
for info in peer_info:
|
||||
assert_net_servicesnames(int(info[0]["services"], 0x10), info[0]["servicesnames"])
|
||||
|
||||
assert_equal(peer_info[0][0]['connection_type'], 'inbound')
|
||||
assert_equal(peer_info[0][1]['connection_type'], 'manual')
|
||||
|
||||
assert_equal(peer_info[1][0]['connection_type'], 'manual')
|
||||
assert_equal(peer_info[1][1]['connection_type'], 'inbound')
|
||||
|
||||
def test_service_flags(self):
|
||||
self.log.info("Test service flags")
|
||||
self.nodes[0].add_p2p_connection(P2PInterface(), services=(1 << 4) | (1 << 63))
|
||||
|
||||
Reference in New Issue
Block a user