mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 22:19:39 +01:00
test: Require standard txs in regtest
This commit is contained in:
@@ -29,7 +29,10 @@ NOT_FINAL_ERROR = "non-BIP68-final (code 64)"
|
||||
class BIP68Test(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 2
|
||||
self.extra_args = [[], ["-acceptnonstdtxn=0"]]
|
||||
self.extra_args = [
|
||||
["-acceptnonstdtxn=1"],
|
||||
["-acceptnonstdtxn=0"],
|
||||
]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -78,7 +78,7 @@ class FullBlockTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
self.setup_clean_chain = True
|
||||
self.extra_args = [[]]
|
||||
self.extra_args = [['-acceptnonstdtxn=1']] # This is a consensus block test, we don't care about tx policy
|
||||
|
||||
def run_test(self):
|
||||
node = self.nodes[0] # convenience reference to the node
|
||||
|
||||
@@ -57,7 +57,11 @@ def cltv_validate(node, tx, height):
|
||||
class BIP65Test(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [['-whitelist=127.0.0.1', '-par=1']] # Use only one script thread to get the exact reject reason for testing
|
||||
self.extra_args = [[
|
||||
'-whitelist=127.0.0.1',
|
||||
'-par=1', # Use only one script thread to get the exact reject reason for testing
|
||||
'-acceptnonstdtxn=1', # cltv_invalidate is nonstandard
|
||||
]]
|
||||
self.setup_clean_chain = True
|
||||
self.rpc_timeout = 120
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class MaxUploadTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [["-maxuploadtarget=800"]]
|
||||
self.extra_args = [["-maxuploadtarget=800", "-acceptnonstdtxn=1"]]
|
||||
|
||||
# Cache for utxos, as the listunspent may take a long time later in the test
|
||||
self.utxo_cache = []
|
||||
|
||||
@@ -67,8 +67,8 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [
|
||||
[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-maxorphantx=1000",
|
||||
"-whitelist=127.0.0.1",
|
||||
"-limitancestorcount=50",
|
||||
"-limitancestorsize=101",
|
||||
"-limitdescendantcount=200",
|
||||
|
||||
@@ -53,17 +53,20 @@ class SegWitTest(BitcoinTestFramework):
|
||||
# This test tests SegWit both pre and post-activation, so use the normal BIP9 activation.
|
||||
self.extra_args = [
|
||||
[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-rpcserialversion=0",
|
||||
"-vbparams=segwit:0:999999999999",
|
||||
"-addresstype=legacy",
|
||||
],
|
||||
[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-blockversion=4",
|
||||
"-rpcserialversion=1",
|
||||
"-vbparams=segwit:0:999999999999",
|
||||
"-addresstype=legacy",
|
||||
],
|
||||
[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-blockversion=536870915",
|
||||
"-vbparams=segwit:0:999999999999",
|
||||
"-addresstype=legacy",
|
||||
|
||||
@@ -36,7 +36,6 @@ class MempoolAcceptanceTest(BitcoinTestFramework):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [[
|
||||
'-txindex',
|
||||
'-acceptnonstdtxn=0', # Try to mimic main-net
|
||||
]] * self.num_nodes
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
|
||||
@@ -13,7 +13,11 @@ class MempoolLimitTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [["-maxmempool=5", "-spendzeroconfchange=0"]]
|
||||
self.extra_args = [[
|
||||
"-acceptnonstdtxn=1",
|
||||
"-maxmempool=5",
|
||||
"-spendzeroconfchange=0",
|
||||
]]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -14,7 +14,10 @@ class PrioritiseTransactionTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 2
|
||||
self.extra_args = [["-printpriority=1"], ["-printpriority=1"]]
|
||||
self.extra_args = [[
|
||||
"-printpriority=1",
|
||||
"-acceptnonstdtxn=1",
|
||||
]] * self.num_nodes
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -95,6 +95,9 @@ class CompactBlocksTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [[
|
||||
"-acceptnonstdtxn=1",
|
||||
]]
|
||||
self.utxos = []
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
|
||||
@@ -25,6 +25,9 @@ from data import invalid_txs
|
||||
class InvalidTxRequestTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 1
|
||||
self.extra_args = [[
|
||||
"-acceptnonstdtxn=1",
|
||||
]]
|
||||
self.setup_clean_chain = True
|
||||
|
||||
def bootstrap_p2p(self, *, num_connections=1):
|
||||
|
||||
@@ -184,7 +184,11 @@ class SegWitTest(BitcoinTestFramework):
|
||||
self.setup_clean_chain = True
|
||||
self.num_nodes = 3
|
||||
# This test tests SegWit both pre and post-activation, so use the normal BIP9 activation.
|
||||
self.extra_args = [["-whitelist=127.0.0.1", "-vbparams=segwit:0:999999999999"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0", "-vbparams=segwit:0:999999999999"], ["-whitelist=127.0.0.1", "-vbparams=segwit:0:0"]]
|
||||
self.extra_args = [
|
||||
["-whitelist=127.0.0.1", "-acceptnonstdtxn=1", "-vbparams=segwit:0:999999999999"],
|
||||
["-whitelist=127.0.0.1", "-acceptnonstdtxn=0", "-vbparams=segwit:0:999999999999"],
|
||||
["-whitelist=127.0.0.1", "-acceptnonstdtxn=1", "-vbparams=segwit:0:0"],
|
||||
]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
|
||||
@@ -20,6 +20,9 @@ from test_framework.util import (
|
||||
class WalletTest(BitcoinTestFramework):
|
||||
def set_test_params(self):
|
||||
self.num_nodes = 4
|
||||
self.extra_args = [[
|
||||
"-acceptnonstdtxn=1",
|
||||
]] * self.num_nodes
|
||||
self.setup_clean_chain = True
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
|
||||
Reference in New Issue
Block a user