Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_cltv.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2016 The Bitcoin Core developers | # Copyright (c) 2015-2016 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 | |||||
from test_framework.messages import ( | |||||
CTransaction, | |||||
FromHex, | |||||
msg_block, | |||||
msg_tx, | |||||
ToHex, | |||||
) | |||||
from test_framework.mininode import ( | |||||
mininode_lock, | |||||
network_thread_start, | |||||
P2PInterface, | |||||
) | |||||
from test_framework.script import ( | |||||
CScript, | |||||
CScriptNum, | |||||
OP_1NEGATE, | |||||
OP_CHECKLOCKTIMEVERIFY, | |||||
OP_DROP, | |||||
OP_TRUE, | |||||
) | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | |||||
from test_framework.mininode import * | |||||
from test_framework.blocktools import create_coinbase, create_block | |||||
from test_framework.script import CScript, CScriptNum, OP_1NEGATE, OP_CHECKLOCKTIMEVERIFY, OP_DROP, OP_TRUE | |||||
from test_framework.txtools import pad_tx | from test_framework.txtools import pad_tx | ||||
from test_framework.util import assert_equal, wait_until | |||||
CLTV_HEIGHT = 1351 | CLTV_HEIGHT = 1351 | ||||
# Reject codes that we might receive in this test | # Reject codes that we might receive in this test | ||||
REJECT_INVALID = 16 | REJECT_INVALID = 16 | ||||
REJECT_OBSOLETE = 17 | REJECT_OBSOLETE = 17 | ||||
REJECT_NONSTANDARD = 64 | REJECT_NONSTANDARD = 64 | ||||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |