MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / assert_template

Function assert_template

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

Source from the content-addressed store, hash-verified

21 return b2a_hex(b).decode('ascii')
22
23def assert_template(node, block, expect, rehash=True):
24 if rehash:
25 block.hashMerkleRoot = block.calc_merkle_root()
26 rsp = node.getblocktemplate({'data': b2x(block.serialize(legacy=False)), 'mode': 'proposal'})
27 assert_equal(rsp, expect)
28
29class MiningTest(BitcoinTestFramework):
30 def set_test_params(self):

Callers 1

run_testMethod · 0.85

Calls 4

assert_equalFunction · 0.90
b2xFunction · 0.85
calc_merkle_rootMethod · 0.80
serializeMethod · 0.45

Tested by

no test coverage detected