MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / send_blocks

Method send_blocks

test/functional/feature_block.py:1446–1453  ·  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

1444 self.bootstrap_p2p(timeout=timeout)
1445
1446 def send_blocks(self, blocks, success=True, reject_reason=None, force_send=False, reconnect=False, timeout=960):
1447 """Sends blocks to test node. Syncs and verifies that tip has advanced to most recent block.
1448
1449 Call with success = False if the tip shouldn't advance to the most recent block."""
1450 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)
1451
1452 if reconnect:
1453 self.reconnect_p2p(timeout=timeout)
1454
1455
1456if __name__ == '__main__':

Callers 1

run_testMethod · 0.95

Calls 2

reconnect_p2pMethod · 0.95
send_blocks_and_testMethod · 0.80

Tested by

no test coverage detected