From f69578127bd32e1154f45dbec47213c38f7ffd55 Mon Sep 17 00:00:00 2001 From: David Burkett Date: Mon, 20 Feb 2023 17:18:59 -0500 Subject: [PATCH] Updating bitcoin ports to litecoin's equivalent --- src/rpc/net.cpp | 12 ++++++------ test/functional/p2p_addr_relay.py | 6 +++--- test/functional/test_framework/p2p.py | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/rpc/net.cpp b/src/rpc/net.cpp index 207509d71f..baf7615ef2 100644 --- a/src/rpc/net.cpp +++ b/src/rpc/net.cpp @@ -345,8 +345,8 @@ static RPCHelpMan addconnection() { RPCResult::Type::STR, "connection_type", "Type of connection opened." }, }}, RPCExamples{ - HelpExampleCli("addconnection", "\"192.168.0.6:8333\" \"outbound-full-relay\"") - + HelpExampleRpc("addconnection", "\"192.168.0.6:8333\" \"outbound-full-relay\"") + HelpExampleCli("addconnection", "\"192.168.0.6:9333\" \"outbound-full-relay\"") + + HelpExampleRpc("addconnection", "\"192.168.0.6:9333\" \"outbound-full-relay\"") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { @@ -397,9 +397,9 @@ static RPCHelpMan disconnectnode() }, RPCResult{RPCResult::Type::NONE, "", ""}, RPCExamples{ - HelpExampleCli("disconnectnode", "\"192.168.0.6:8333\"") + HelpExampleCli("disconnectnode", "\"192.168.0.6:9333\"") + HelpExampleCli("disconnectnode", "\"\" 1") - + HelpExampleRpc("disconnectnode", "\"192.168.0.6:8333\"") + + HelpExampleRpc("disconnectnode", "\"192.168.0.6:9333\"") + HelpExampleRpc("disconnectnode", "\"\", 1") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue @@ -915,8 +915,8 @@ static RPCHelpMan addpeeraddress() }, }, RPCExamples{ - HelpExampleCli("addpeeraddress", "\"1.2.3.4\" 8333") - + HelpExampleRpc("addpeeraddress", "\"1.2.3.4\", 8333") + HelpExampleCli("addpeeraddress", "\"1.2.3.4\" 9333") + + HelpExampleRpc("addpeeraddress", "\"1.2.3.4\", 9333") }, [&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue { diff --git a/test/functional/p2p_addr_relay.py b/test/functional/p2p_addr_relay.py index dc4996b718..7dd7e3b342 100755 --- a/test/functional/p2p_addr_relay.py +++ b/test/functional/p2p_addr_relay.py @@ -29,7 +29,7 @@ for i in range(10): addr.time = int(time.time()) + i addr.nServices = NODE_NETWORK | NODE_WITNESS addr.ip = "123.123.123.{}".format(i % 256) - addr.port = 8333 + i + addr.port = 9333 + i ADDRS.append(addr) @@ -39,7 +39,7 @@ class AddrReceiver(P2PInterface): for addr in message.addrs: assert_equal(addr.nServices, 9) assert addr.ip.startswith('123.123.123.') - assert (8333 <= addr.port < 8343) + assert (9333 <= addr.port < 9343) def on_getaddr(self, message): # When the node sends us a getaddr, it increments the addr relay tokens for the connection by 1000 @@ -93,7 +93,7 @@ class AddrTest(BitcoinTestFramework): addr.time = self.mocktime + i addr.nServices = NODE_NETWORK | NODE_WITNESS addr.ip = f"{random.randrange(128,169)}.{random.randrange(1,255)}.{random.randrange(1,255)}.{random.randrange(1,255)}" - addr.port = 8333 + addr.port = 9333 addrs.append(addr) msg = msg_addr() msg.addrs = addrs diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index eef8a98e86..aa6bb42997 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -158,14 +158,14 @@ class P2PConnection(asyncio.Protocol): self.peer_connect_helper(dstaddr, dstport, net, timeout_factor) loop = NetworkThread.network_event_loop - logger.debug('Connecting to Bitcoin Node: %s:%d' % (self.dstaddr, self.dstport)) + logger.debug('Connecting to Litecoin Node: %s:%d' % (self.dstaddr, self.dstport)) coroutine = loop.create_connection(lambda: self, host=self.dstaddr, port=self.dstport) return lambda: loop.call_soon_threadsafe(loop.create_task, coroutine) def peer_accept_connection(self, connect_id, connect_cb=lambda: None, *, net, timeout_factor): self.peer_connect_helper('0', 0, net, timeout_factor) - logger.debug('Listening for Bitcoin Node with id: {}'.format(connect_id)) + logger.debug('Listening for Litecoin Node with id: {}'.format(connect_id)) return lambda: NetworkThread.listen(self, connect_cb, idx=connect_id) def peer_disconnect(self):