Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-schnorr-activation.py
Show All 12 Lines | |||||
- optional: tests of valid 64-byte DER signatures (same length as Schnorr). | - optional: tests of valid 64-byte DER signatures (same length as Schnorr). | ||||
This requires a temporary patch to bitcoind; see fakeDER64 comment below. | This requires a temporary patch to bitcoind; see fakeDER64 comment below. | ||||
- advance and rewind mempool drop tests. | - advance and rewind mempool drop tests. | ||||
Derived from abc-replay-protection.py with improvements borrowed from | Derived from abc-replay-protection.py with improvements borrowed from | ||||
abc-segwit-recovery-activation.py. | abc-segwit-recovery-activation.py. | ||||
""" | """ | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.blocktools import ( | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error, sync_blocks | create_block, | ||||
from test_framework.comptool import TestManager, TestInstance, RejectResult | create_coinbase, | ||||
from test_framework.blocktools import * | create_transaction, | ||||
make_conform_to_ctor, | |||||
) | |||||
from test_framework.comptool import RejectResult, TestInstance, TestManager | |||||
from test_framework.key import CECKey | from test_framework.key import CECKey | ||||
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 import schnorr | from test_framework import schnorr | ||||
from test_framework.script import * | from test_framework.script import ( | ||||
CScript, | |||||
OP_1, | |||||
OP_CHECKMULTISIG, | |||||
OP_CHECKSIG, | |||||
OP_TRUE, | |||||
SIGHASH_ALL, | |||||
SIGHASH_FORKID, | |||||
SignatureHashForkId, | |||||
) | |||||
from test_framework.test_framework import BitcoinTestFramework | |||||
from test_framework.util import assert_equal, assert_raises_rpc_error, 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 | ||||
# If we don't do this, autoreplay protection will activate simultaneous with | # If we don't do this, autoreplay protection will activate simultaneous with | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |