Changeset View
Changeset View
Standalone View
Standalone View
test/functional/mempool_accept.py
Show All 32 Lines | 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', | ||||
'-reindex', # Need reindex for txindex | '-reindex', # Need reindex for txindex | ||||
'-acceptnonstdtxn=0', # Try to mimic main-net | '-acceptnonstdtxn=0', # Try to mimic main-net | ||||
]] * self.num_nodes | ]] * self.num_nodes | ||||
def skip_test_if_missing_module(self): | |||||
self.skip_if_no_wallet() | |||||
def check_mempool_result(self, result_expected, *args, **kwargs): | def check_mempool_result(self, result_expected, *args, **kwargs): | ||||
"""Wrapper to check result of testmempoolaccept on node_0's mempool""" | """Wrapper to check result of testmempoolaccept on node_0's mempool""" | ||||
result_test = self.nodes[0].testmempoolaccept(*args, **kwargs) | result_test = self.nodes[0].testmempoolaccept(*args, **kwargs) | ||||
assert_equal(result_expected, result_test) | assert_equal(result_expected, result_test) | ||||
# Must not change mempool state | # Must not change mempool state | ||||
assert_equal(self.nodes[0].getmempoolinfo()['size'], self.mempool_size) | assert_equal(self.nodes[0].getmempoolinfo()['size'], self.mempool_size) | ||||
def run_test(self): | def run_test(self): | ||||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |