Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-schnorrmultisig-activation.py
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | def set_test_params(self): | ||||
REPLAY_PROTECTION_START_TIME)]] | REPLAY_PROTECTION_START_TIME)]] | ||||
def bootstrap_p2p(self, *, num_connections=1): | def bootstrap_p2p(self, *, num_connections=1): | ||||
"""Add a P2P connection to the node. | """Add a P2P connection to the node. | ||||
Helper to connect and wait for version handshake.""" | Helper to connect and wait for version handshake.""" | ||||
for _ in range(num_connections): | for _ in range(num_connections): | ||||
self.nodes[0].add_p2p_connection(P2PDataStore()) | self.nodes[0].add_p2p_connection(P2PDataStore()) | ||||
self.nodes[0].p2p.wait_for_verack() | |||||
def reconnect_p2p(self, **kwargs): | def reconnect_p2p(self, **kwargs): | ||||
"""Tear down and bootstrap the P2P connection to the node. | """Tear down and bootstrap the P2P connection to the node. | ||||
The node gets disconnected several times in this test. This helper | The node gets disconnected several times in this test. This helper | ||||
method reconnects the p2p and restarts the network thread.""" | method reconnects the p2p and restarts the network thread.""" | ||||
self.nodes[0].disconnect_p2ps() | self.nodes[0].disconnect_p2ps() | ||||
self.bootstrap_p2p(**kwargs) | self.bootstrap_p2p(**kwargs) | ||||
▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines |