MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / assert_template

Function assert_template

test/functional/mining_basic.py:22–28  ·  view source on GitHub ↗
(node, block, expect, rehash=True)

Source from the content-addressed store, hash-verified

20
21
22def assert_template(node, block, expect, rehash=True):
23 if rehash:
24 block.hashMerkleRoot = block.calc_merkle_root()
25 rsp = node.getblocktemplate(
26 template_request={"data": block.serialize().hex(), "mode": "proposal"}
27 )
28 assert_equal(rsp, expect)
29
30
31class MiningTest(BitcoinTestFramework):

Callers 1

run_testMethod · 0.85

Calls 4

assert_equalFunction · 0.90
calc_merkle_rootMethod · 0.80
hexMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected