aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_cltv.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-05-05 10:10:38 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-08-26 11:08:24 +0200
commitfaf7e485e901d6c72db5d969b526fa148060a003 (patch)
tree25696db90f366bf96b52b7137677cfd36916bf4f /test/functional/feature_cltv.py
parent718d9f2f77270303b2f95dc275cbf416dfd4567b (diff)
downloadbitcoin-faf7e485e901d6c72db5d969b526fa148060a003.tar.xz
Set regtest.BIP65Height = 111 to speed up tests
Diffstat (limited to 'test/functional/feature_cltv.py')
-rwxr-xr-xtest/functional/feature_cltv.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/functional/feature_cltv.py b/test/functional/feature_cltv.py
index dc5bffe33e..3438027db6 100755
--- a/test/functional/feature_cltv.py
+++ b/test/functional/feature_cltv.py
@@ -4,8 +4,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP65 (CHECKLOCKTIMEVERIFY).
-Test that the CHECKLOCKTIMEVERIFY soft-fork activates at (regtest) block height
-1351.
+Test that the CHECKLOCKTIMEVERIFY soft-fork activates.
"""
from test_framework.blocktools import (
@@ -62,9 +61,9 @@ def cltv_invalidate(tx, failure_reason):
# +-------------------------------------------------+------------+--------------+
[[OP_CHECKLOCKTIMEVERIFY], None, None],
[[OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP], None, None],
- [[CScriptNum(1000), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 1296688602], # timestamp of genesis block
- [[CScriptNum(1000), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 500],
- [[CScriptNum(500), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0xffffffff, 500],
+ [[CScriptNum(100), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 1296688602], # timestamp of genesis block
+ [[CScriptNum(100), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0, 50],
+ [[CScriptNum(50), OP_CHECKLOCKTIMEVERIFY, OP_DROP], 0xffffffff, 50],
][failure_reason]
cltv_modify_tx(tx, prepend_scriptsig=scheme[0], nsequence=scheme[1], nlocktime=scheme[2])
@@ -105,6 +104,7 @@ class BIP65Test(BitcoinTestFramework):
self.log.info("Mining %d blocks", CLTV_HEIGHT - 2)
wallet.generate(10)
self.nodes[0].generate(CLTV_HEIGHT - 2 - 10)
+ assert_equal(self.nodes[0].getblockcount(), CLTV_HEIGHT - 2)
self.log.info("Test that invalid-according-to-CLTV transactions can still appear in a block")