aboutsummaryrefslogtreecommitdiff
path: root/test/functional/feature_dersig.py
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-08-05 12:06:23 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-08-05 12:08:33 +0200
commitfafe896a0b870d85250927bd5374caf73d379468 (patch)
treebecab661c425625ba1330ac8ee7bdca9d161919b /test/functional/feature_dersig.py
parentc4b42aa4ffa1596742135acaa805343675acd7ab (diff)
test: Set regtest.BIP66Height = 102 to speed up tests
Diffstat (limited to 'test/functional/feature_dersig.py')
-rwxr-xr-xtest/functional/feature_dersig.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/feature_dersig.py b/test/functional/feature_dersig.py
index eb027c554a..5dd6cb6cb2 100755
--- a/test/functional/feature_dersig.py
+++ b/test/functional/feature_dersig.py
@@ -4,10 +4,11 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
-Test that the DERSIG soft-fork activates at (regtest) height 1251.
+Test the DERSIG soft-fork activation on regtest.
"""
from test_framework.blocktools import (
+ DERSIG_HEIGHT,
create_block,
create_coinbase,
)
@@ -23,8 +24,6 @@ from test_framework.wallet import (
MiniWalletMode,
)
-DERSIG_HEIGHT = 1251
-
# A canonical signature consists of:
# <30> <total len> <02> <len R> <R> <02> <len S> <S> <hashtype>
@@ -90,8 +89,10 @@ class BIP66Test(BitcoinTestFramework):
block.rehash()
block.solve()
+ assert_equal(self.nodes[0].getblockcount(), DERSIG_HEIGHT - 2)
self.test_dersig_info(is_active=False) # Not active as of current tip and next block does not need to obey rules
peer.send_and_ping(msg_block(block))
+ assert_equal(self.nodes[0].getblockcount(), DERSIG_HEIGHT - 1)
self.test_dersig_info(is_active=True) # Not active as of current tip, but next block must obey rules
assert_equal(self.nodes[0].getbestblockhash(), block.hash)