Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_cltv.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2019 The Bitcoin Core developers | # Copyright (c) 2015-2019 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test BIP65 (CHECKLOCKTIMEVERIFY). | """Test BIP65 (CHECKLOCKTIMEVERIFY). | ||||
Test that the CHECKLOCKTIMEVERIFY soft-fork activates at (regtest) block height | Test that the CHECKLOCKTIMEVERIFY soft-fork activates at (regtest) block height | ||||
1351. | 1351. | ||||
""" | """ | ||||
from test_framework.blocktools import create_block, create_coinbase, create_transaction, make_conform_to_ctor | from test_framework.blocktools import ( | ||||
create_block, | |||||
create_coinbase, | |||||
create_transaction, | |||||
make_conform_to_ctor, | |||||
) | |||||
from test_framework.messages import ( | from test_framework.messages import ( | ||||
CTransaction, | CTransaction, | ||||
FromHex, | FromHex, | ||||
ToHex, | |||||
msg_block, | msg_block, | ||||
msg_tx, | msg_tx, | ||||
ToHex, | |||||
) | |||||
from test_framework.p2p import ( | |||||
P2PInterface, | |||||
) | ) | ||||
from test_framework.p2p import P2PInterface | |||||
from test_framework.script import ( | from test_framework.script import ( | ||||
CScript, | |||||
CScriptNum, | |||||
OP_1NEGATE, | OP_1NEGATE, | ||||
OP_CHECKLOCKTIMEVERIFY, | OP_CHECKLOCKTIMEVERIFY, | ||||
OP_DROP, | OP_DROP, | ||||
OP_TRUE, | OP_TRUE, | ||||
CScript, | |||||
CScriptNum, | |||||
) | ) | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.txtools import pad_tx | from test_framework.txtools import pad_tx | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
CLTV_HEIGHT = 1351 | CLTV_HEIGHT = 1351 | ||||
▲ Show 20 Lines • Show All 182 Lines • Show Last 20 Lines |