Changeset View
Changeset View
Standalone View
Standalone View
test/functional/txn_doublespend.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2014-2016 The Bitcoin Core developers | # Copyright (c) 2014-2016 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 proper accounting with a double-spend conflict | # Test proper accounting with a double-spend conflict | ||||
# | # | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | from test_framework.util import * | ||||
class TxnMallTest(BitcoinTestFramework): | class TxnMallTest(BitcoinTestFramework): | ||||
def set_test_params(self): | |||||
def __init__(self): | |||||
super().__init__() | |||||
self.num_nodes = 4 | self.num_nodes = 4 | ||||
self.setup_clean_chain = False | |||||
def add_options(self, parser): | def add_options(self, parser): | ||||
parser.add_option( | parser.add_option( | ||||
"--mineblock", dest="mine_block", default=False, action="store_true", | "--mineblock", dest="mine_block", default=False, action="store_true", | ||||
help="Test double-spend of 1-confirmed transaction") | help="Test double-spend of 1-confirmed transaction") | ||||
def setup_network(self): | def setup_network(self): | ||||
# Start with split network: | # Start with split network: | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |