You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/functional/feature_csv_activation.py
+31-66Lines changed: 31 additions & 66 deletions
Original file line number
Diff line number
Diff line change
@@ -2,23 +2,17 @@
2
2
# Copyright (c) 2015-2019 The Bitcoin Core developers
3
3
# Distributed under the MIT software license, see the accompanying
4
4
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
-
"""Test activation of the first version bits soft fork.
5
+
"""Test CSV soft fork activation.
6
6
7
7
This soft fork will activate the following BIPS:
8
8
BIP 68 - nSequence relative lock times
9
9
BIP 112 - CHECKSEQUENCEVERIFY
10
10
BIP 113 - MedianTimePast semantics for nLockTime
11
11
12
-
regtest lock-in with 108/144 block signalling
13
-
activation after a further 144 blocks
14
-
15
12
mine 82 blocks whose coinbases will be used to generate inputs for our tests
16
-
mine 61 blocks to transition from DEFINED to STARTED
17
-
mine 144 blocks only 100 of which are signaling readiness in order to fail to change state this period
18
-
mine 144 blocks with 108 signaling and verify STARTED->LOCKED_IN
19
-
mine 140 blocks and seed block chain with the 82 inputs will use for our tests at height 572
20
-
mine 3 blocks and verify still at LOCKED_IN and test that enforcement has not triggered
21
-
mine 1 block and test that enforcement has triggered (which triggers ACTIVE)
13
+
mine 345 blocks and seed block chain with the 82 inputs will use for our tests at height 427
14
+
mine 2 blocks and verify soft fork not yet activated
15
+
mine 1 block and test that soft fork is activated (rules enforced for next block)
22
16
Test BIP 113 is enforced
23
17
Mine 4 blocks so next height is 580 and test BIP 68 is enforced for time and height
24
18
Mine 1 block so next height is 581 and test BIP 68 now passes time but not height
self.log.info("Height = {}, CSV not yet active (will activate for block {}, not {})".format(self.tipheight, CSV_ACTIVATION_HEIGHT, CSV_ACTIVATION_HEIGHT-1))
234
+
assertnotsoftfork_active(self.nodes[0], 'csv')
271
235
272
236
# Test both version 1 and version 2 transactions for all tests
273
237
# BIP113 test transaction will be modified before each use to put in appropriate block time
0 commit comments