[rpc] Add connection type to getpeerinfo RPC, update tests

This commit is contained in:
Amiti Uttarwar committed 2020-09-21 19:01:29 -07:00
1 parent 49c10a9ca4
commit 395acfa83a
4 files changed
+19

No files matched your search

+6
View File
@@ -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))