MCPcopy Create free account
hub / github.com/LUX-Core/lux / assert_template

Function assert_template

test/functional/mining.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()), 'mode': 'proposal'})
27 assert_equal(rsp, expect)
28
29class MiningTest(LuxTestFramework):
30 def set_test_params(self):

Callers 1

run_testMethod · 0.70

Calls 4

assert_equalFunction · 0.90
b2xFunction · 0.70
calc_merkle_rootMethod · 0.45
serializeMethod · 0.45

Tested by

no test coverage detected