test: refactor: eliminate genesis block timestamp magic numbers
This commit is contained in:
1 parent
e334f7a545
commit
dbed28968a
2 files changed
+12
-8
No files matched your search
@@ -8,6 +8,7 @@ Test that the CHECKLOCKTIMEVERIFY soft-fork activates.
|
||||
"""
|
||||
|
||||
from test_framework.blocktools import (
|
||||
TIME_GENESIS_BLOCK,
|
||||
create_block,
|
||||
create_coinbase,
|
||||
)
|
||||
@@ -61,7 +62,7 @@ def cltv_invalidate(tx, failure_reason):
|
||||
# +-------------------------------------------------+------------+--------------+
|
||||
[[OP_CHECKLOCKTIMEVERIFY], None, None],
|
||||
[[OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP], None, None],
|
||||
[[CScriptNum(100), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 1296688602], # timestamp of genesis block
|
||||
[[CScriptNum(100), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, TIME_GENESIS_BLOCK],
|
||||
[[CScriptNum(100), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 50],
|
||||
[[CScriptNum(50), OP_CHECKLOCKTIMEVERIFY, OP_DROP], SEQUENCE_FINAL, 50],
|
||||
][failure_reason]
|
||||
|
||||
Reference in new issue
Block a user