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

Method send_blocks

test/functional/feature_block.py:1473–1480  ·  view source on GitHub ↗

Sends blocks to test node. Syncs and verifies that tip has advanced to most recent block. Call with success = False if the tip shouldn't advance to the most recent block.

(self, blocks, success=True, reject_reason=None, force_send=False, reconnect=False, timeout=960)

Source from the content-addressed store, hash-verified

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.
1475
1476 Call with success = False if the tip shouldn't advance to the most recent block."""
1477 self.helper_peer.send_blocks_and_test(blocks, self.nodes[0], success=success, reject_reason=reject_reason, force_send=force_send, timeout=timeout, expect_disconnect=reconnect)
1478
1479 if reconnect:
1480 self.reconnect_p2p(timeout=timeout)
1481
1482
1483if __name__ == '__main__':

Callers 1

run_testMethod · 0.95

Calls 2

reconnect_p2pMethod · 0.95
send_blocks_and_testMethod · 0.45

Tested by

no test coverage detected