Changeset View
Changeset View
Standalone View
Standalone View
test/functional/wallet_abandonconflict.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 the abandontransaction RPC. | """Test the abandontransaction RPC. | ||||
The abandontransaction RPC marks a transaction and all its in-wallet | The abandontransaction RPC marks a transaction and all its in-wallet | ||||
descendants as abandoned which allows their inputs to be respent. It can be | descendants as abandoned which allows their inputs to be respent. It can be | ||||
used to replace "stuck" or evicted transactions. It only works on transactions | used to replace "stuck" or evicted transactions. It only works on transactions | ||||
which are not included in a block and are not currently in the mempool. It has | which are not included in a block and are not currently in the mempool. It has | ||||
no effect on transactions which are already conflicted or abandoned. | no effect on transactions which are already conflicted or abandoned. | ||||
""" | """ | ||||
from decimal import Decimal | |||||
from test_framework.messages import CTransaction, FromHex | |||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import * | from test_framework.util import ( | ||||
from test_framework.mininode import * | assert_equal, | ||||
connect_nodes, | |||||
disconnect_nodes, | |||||
satoshi_round, | |||||
sync_blocks, | |||||
sync_mempools, | |||||
) | |||||
class AbandonConflictTest(BitcoinTestFramework): | class AbandonConflictTest(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.num_nodes = 2 | self.num_nodes = 2 | ||||
self.extra_args = [["-minrelaytxfee=0.00001"], []] | self.extra_args = [["-minrelaytxfee=0.00001"], []] | ||||
def run_test(self): | def run_test(self): | ||||
▲ Show 20 Lines • Show All 178 Lines • Show Last 20 Lines |