aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_net.py
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-08-12 13:57:13 -0700
committerAmiti Uttarwar <amiti@uttarwar.org>2020-09-21 19:01:29 -0700
commit395acfa83a5436790c1a722a5609ac9d48df235f (patch)
tree523f1a77f69da9ff7e44f4bc602bbaf2dc14aa2b /test/functional/rpc_net.py
parent49c10a9ca40967d28ae16dfea9cccc6f3a6624a1 (diff)
downloadbitcoin-395acfa83a5436790c1a722a5609ac9d48df235f.tar.xz
[rpc] Add connection type to getpeerinfo RPC, update tests
Diffstat (limited to 'test/functional/rpc_net.py')
-rwxr-xr-xtest/functional/rpc_net.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/rpc_net.py b/test/functional/rpc_net.py
index bc0e5b458e..b8a04f494d 100755
--- a/test/functional/rpc_net.py
+++ b/test/functional/rpc_net.py
@@ -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))