Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-segwit-recovery-activation.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 | ||||
# Copyright (c) 2017-2019 The Bitcoin developers | # Copyright (c) 2017-2019 The Bitcoin 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. | ||||
""" | """ | ||||
This test checks activation of the SCRIPT_ALLOW_SEGWIT_RECOVERY flag | This test checks activation of the SCRIPT_ALLOW_SEGWIT_RECOVERY flag | ||||
""" | """ | ||||
from test_framework.blocktools import ( | |||||
create_block, | |||||
create_coinbase, | |||||
make_conform_to_ctor, | |||||
) | |||||
from test_framework.comptool import RejectResult, TestInstance, TestManager | |||||
from test_framework.messages import ( | |||||
COIN, | |||||
COutPoint, | |||||
CTransaction, | |||||
CTxIn, | |||||
CTxOut, | |||||
msg_tx, | |||||
ToHex, | |||||
) | |||||
from test_framework.mininode import ( | |||||
mininode_lock, | |||||
network_thread_start, | |||||
P2PInterface, | |||||
) | |||||
from test_framework.script import ( | |||||
CScript, | |||||
hash160, | |||||
OP_EQUAL, | |||||
OP_HASH160, | |||||
OP_TRUE, | |||||
) | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error, sync_blocks | from test_framework.util import ( | ||||
from test_framework.comptool import TestManager, TestInstance, RejectResult | assert_equal, | ||||
from test_framework.blocktools import * | assert_raises_rpc_error, | ||||
from test_framework.script import * | sync_blocks, | ||||
) | |||||
# far into the future | # far into the future | ||||
GREAT_WALL_START_TIME = 2000000000 | GREAT_WALL_START_TIME = 2000000000 | ||||
# First blocks (initial coinbases, pre-fork test blocks) happen 1 day before. | # First blocks (initial coinbases, pre-fork test blocks) happen 1 day before. | ||||
FIRST_BLOCK_TIME = GREAT_WALL_START_TIME - 86400 | FIRST_BLOCK_TIME = GREAT_WALL_START_TIME - 86400 | ||||
# Error due to non clean stack | # Error due to non clean stack | ||||
▲ Show 20 Lines • Show All 307 Lines • Show Last 20 Lines |