Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_accept.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2017-2019 The Bitcoin Core developers | # Copyright (c) 2017-2019 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 mempool acceptance of raw transactions.""" | """Test mempool acceptance of raw transactions.""" | ||||
from test_framework.test_framework import BitcoinTestFramework | |||||
from test_framework.key import ECKey | from test_framework.key import ECKey | ||||
from test_framework.messages import ( | from test_framework.messages import ( | ||||
MAX_BLOCK_BASE_SIZE, | |||||
MAX_MONEY, | |||||
XEC, | XEC, | ||||
COutPoint, | COutPoint, | ||||
CTransaction, | CTransaction, | ||||
CTxOut, | CTxOut, | ||||
FromHex, | FromHex, | ||||
MAX_BLOCK_BASE_SIZE, | |||||
ToHex, | ToHex, | ||||
MAX_MONEY, | |||||
) | ) | ||||
from test_framework.script import ( | from test_framework.script import ( | ||||
hash160, | |||||
CScript, | |||||
OP_0, | OP_0, | ||||
OP_2, | OP_2, | ||||
OP_3, | OP_3, | ||||
OP_CHECKMULTISIG, | OP_CHECKMULTISIG, | ||||
OP_EQUAL, | OP_EQUAL, | ||||
OP_HASH160, | OP_HASH160, | ||||
OP_RETURN, | OP_RETURN, | ||||
CScript, | |||||
hash160, | |||||
) | ) | ||||
from test_framework.util import ( | from test_framework.test_framework import BitcoinTestFramework | ||||
assert_equal, | from test_framework.util import assert_equal, assert_raises_rpc_error | ||||
assert_raises_rpc_error, | |||||
) | |||||
class MempoolAcceptanceTest(BitcoinTestFramework): | class MempoolAcceptanceTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.extra_args = [[ | self.extra_args = [[ | ||||
'-txindex', | '-txindex', | ||||
'-acceptnonstdtxn=0', # Try to mimic main-net | '-acceptnonstdtxn=0', # Try to mimic main-net | ||||
▲ Show 20 Lines • Show All 339 Lines • Show Last 20 Lines |