MCPcopy Create free account
hub / github.com/ElementsProject/elements / reconnect_p2p

Method reconnect_p2p

test/functional/feature_block.py:1465–1471  ·  view source on GitHub ↗

Tear down and bootstrap the P2P connection to the node. The node gets disconnected several times in this test. This helper method reconnects the p2p and restarts the network thread.

(self, timeout=60)

Source from the content-addressed store, hash-verified

1463 self.helper_peer.wait_for_getheaders(timeout=timeout)
1464
1465 def reconnect_p2p(self, timeout=60):
1466 """Tear down and bootstrap the P2P connection to the node.
1467
1468 The node gets disconnected several times in this test. This helper
1469 method reconnects the p2p and restarts the network thread."""
1470 self.nodes[0].disconnect_p2ps()
1471 self.bootstrap_p2p(timeout=timeout)
1472
1473 def send_blocks(self, blocks, success=True, reject_reason=None, force_send=False, reconnect=False, timeout=960):
1474 """Sends blocks to test node. Syncs and verifies that tip has advanced to most recent block.

Callers 2

run_testMethod · 0.95
send_blocksMethod · 0.95

Calls 2

bootstrap_p2pMethod · 0.95
disconnect_p2psMethod · 0.45

Tested by

no test coverage detected