Changeset View
Changeset View
Standalone View
Standalone View
test/functional/abc-mempool-coherence-on-activations.py
Show All 13 Lines | |||||
2) on deactivations, post-fork-only transactions (unconfirmed or once | 2) on deactivations, post-fork-only transactions (unconfirmed or once | ||||
confirmed) are evicted from the mempool, while always-valid transactions | confirmed) are evicted from the mempool, while always-valid transactions | ||||
are reincluded. | are reincluded. | ||||
3) on a reorg to a chain that deactivates and reactivates the fork, | 3) on a reorg to a chain that deactivates and reactivates the fork, | ||||
post-fork-only and always-valid transactions (unconfirmed and/or once | post-fork-only and always-valid transactions (unconfirmed and/or once | ||||
confirmed on the shorter chain) are kept or reincluded in the mempool. | confirmed on the shorter chain) are kept or reincluded in the mempool. | ||||
""" | """ | ||||
from test_framework.blocktools import ( | |||||
create_block, | |||||
create_coinbase, | |||||
create_transaction, | |||||
make_conform_to_ctor, | |||||
) | |||||
from test_framework.comptool import TestInstance, TestManager | |||||
from test_framework.key import CECKey | |||||
from test_framework.messages import ( | |||||
COIN, | |||||
COutPoint, | |||||
CTransaction, | |||||
CTxIn, | |||||
CTxOut, | |||||
ToHex, | |||||
) | |||||
from test_framework.mininode import network_thread_start | |||||
from test_framework.script import ( | |||||
CScript, | |||||
OP_CHECKSIG, | |||||
OP_TRUE, | |||||
SIGHASH_ALL, | |||||
SIGHASH_FORKID, | |||||
SignatureHashForkId, | |||||
) | |||||
from test_framework.test_framework import ComparisonTestFramework | from test_framework.test_framework import ComparisonTestFramework | ||||
from test_framework.util import assert_equal, assert_raises_rpc_error | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
from test_framework.comptool import TestManager, TestInstance | |||||
from test_framework.blocktools import * | |||||
from test_framework.key import CECKey | |||||
from test_framework.script import * | |||||
# ---Code specific to the activation used for this test--- | # ---Code specific to the activation used for this test--- | ||||
# It might change depending on the activation code currently existing in the | # It might change depending on the activation code currently existing in the | ||||
# client software. We use the replay protection activation for this test. | # client software. We use the replay protection activation for this test. | ||||
ACTIVATION_TIME = 2000000000 | ACTIVATION_TIME = 2000000000 | ||||
EXTRA_ARG = "-replayprotectionactivationtime={}".format(ACTIVATION_TIME) | EXTRA_ARG = "-replayprotectionactivationtime={}".format(ACTIVATION_TIME) | ||||
▲ Show 20 Lines • Show All 338 Lines • Show Last 20 Lines |