mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
[tests] Rename NodeConn and NodeConnCB
NodeConn -> P2PConnection NodeConnCB -> P2PInterface
This commit is contained in:
@@ -20,7 +20,7 @@ from test_framework.util import *
|
||||
|
||||
banscore = 10
|
||||
|
||||
class CLazyNode(NodeConnCB):
|
||||
class CLazyNode(P2PInterface):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.unexpected_msg = False
|
||||
@@ -139,10 +139,10 @@ class P2PLeakTest(BitcoinTestFramework):
|
||||
self.log.info("Service bits 5 and 7 are allowed after August 1st 2018")
|
||||
self.nodes[0].setmocktime(1533168000) # August 2nd 2018
|
||||
|
||||
allowed_service_bit5_node = self.nodes[0].add_p2p_connection(NodeConnCB(), services=NODE_NETWORK|NODE_UNSUPPORTED_SERVICE_BIT_5)
|
||||
allowed_service_bit7_node = self.nodes[0].add_p2p_connection(NodeConnCB(), services=NODE_NETWORK|NODE_UNSUPPORTED_SERVICE_BIT_7)
|
||||
allowed_service_bit5_node = self.nodes[0].add_p2p_connection(P2PInterface(), services=NODE_NETWORK|NODE_UNSUPPORTED_SERVICE_BIT_5)
|
||||
allowed_service_bit7_node = self.nodes[0].add_p2p_connection(P2PInterface(), services=NODE_NETWORK|NODE_UNSUPPORTED_SERVICE_BIT_7)
|
||||
|
||||
NetworkThread().start() # Network thread stopped when all previous NodeConnCBs disconnected. Restart it
|
||||
NetworkThread().start() # Network thread stopped when all previous P2PInterfaces disconnected. Restart it
|
||||
|
||||
wait_until(lambda: allowed_service_bit5_node.message_count["verack"], lock=mininode_lock)
|
||||
wait_until(lambda: allowed_service_bit7_node.message_count["verack"], lock=mininode_lock)
|
||||
|
||||
Reference in New Issue
Block a user