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

Method test_height_in_locktime

test/functional/mining_basic.py:384–389  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

382 )
383
384 def test_height_in_locktime(self):
385 self.log.info("Sanity check generated blocks have their coinbase timelocked to their height.")
386 self.generate(self.nodes[0], 1, sync_fun=self.no_op)
387 block = self.nodes[0].getblock(self.nodes[0].getbestblockhash(), 2)
388 assert_equal(block["tx"][0]["locktime"], block["height"] - 1)
389 assert_equal(block["tx"][0]["vin"][0]["sequence"], MAX_SEQUENCE_NONFINAL)
390
391 def run_test(self):
392 node = self.nodes[0]

Callers 1

run_testMethod · 0.95

Calls 3

assert_equalFunction · 0.90
infoMethod · 0.80
generateMethod · 0.45

Tested by

no test coverage detected