test: Test year 2106 block timestamps

* Use maximum timestamp in getblocktemplate test
* Mine block with maximum timestamp and MTP in blockchain test
This commit is contained in:
MacroFake
2022-10-05 16:58:18 +02:00
parent a97791d9fb
commit fafc96aaf4
2 changed files with 10 additions and 1 deletions

View File

@@ -200,7 +200,7 @@ class MiningTest(BitcoinTestFramework):
self.log.info("getblocktemplate: Test bad timestamps")
bad_block = copy.deepcopy(block)
bad_block.nTime = 2**31 - 1
bad_block.nTime = 2**32 - 1
assert_template(node, bad_block, 'time-too-new')
assert_submitblock(bad_block, 'time-too-new', 'time-too-new')
bad_block.nTime = 0