|
2 | 2 | # Copyright (c) 2015-2018 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 BIP 34, 65, 66 activation at block 0""" |
| 5 | +"""Test BIP 34, 65, 66, CSV activation at block 0""" |
6 | 6 |
|
7 | 7 | from test_framework.blocktools import create_coinbase, create_block, create_transaction |
8 | 8 | from test_framework.messages import msg_block |
9 | 9 | from test_framework.mininode import P2PInterface |
10 | 10 | from test_framework.test_framework import BitcoinTestFramework |
11 | | -from test_framework.util import assert_equal |
| 11 | +from test_framework.util import assert_equal, get_bip9_status |
12 | 12 |
|
13 | 13 | from feature_cltv import cltv_validate |
14 | 14 |
|
15 | 15 | class BlockV4Test(BitcoinTestFramework): |
16 | 16 | def set_test_params(self): |
17 | 17 | self.num_nodes = 1 |
18 | | - self.extra_args = [['-whitelist=127.0.0.1', '-con_bip34height=0', '-con_bip65height=0', '-con_bip66height=0']] |
| 18 | + self.extra_args = [['-whitelist=127.0.0.1', '-con_bip34height=0', '-con_bip65height=0', '-con_bip66height=0', '-con_csv_deploy_start=-1']] |
19 | 19 | self.setup_clean_chain = True |
20 | 20 |
|
21 | 21 | def run_test(self): |
| 22 | + |
| 23 | + # First, quick check that CSV is ACTIVE at genesis |
| 24 | + assert_equal(self.nodes[0].getblockcount(), 0) |
| 25 | + assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], 'active') |
| 26 | + |
22 | 27 | self.nodes[0].add_p2p_connection(P2PInterface()) |
23 | 28 |
|
24 | 29 | self.nodeaddress = self.nodes[0].getnewaddress() |
|
0 commit comments