mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 10:12:28 +02:00
wallet, rpc:remove settxfee and paytxfee
This commit is contained in:
@@ -59,7 +59,6 @@ class BumpFeeTest(BitcoinTestFramework):
|
||||
"-walletrbf={}".format(i),
|
||||
"-mintxfee=0.00002",
|
||||
"-addresstype=bech32",
|
||||
"-deprecatedrpc=settxfee"
|
||||
] for i in range(self.num_nodes)]
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
@@ -105,7 +104,6 @@ class BumpFeeTest(BitcoinTestFramework):
|
||||
test_bumpfee_metadata(self, rbf_node, dest_address)
|
||||
test_locked_wallet_fails(self, rbf_node, dest_address)
|
||||
test_change_script_match(self, rbf_node, dest_address)
|
||||
test_settxfee(self, rbf_node, dest_address)
|
||||
test_maxtxfee_fails(self, rbf_node, dest_address)
|
||||
# These tests wipe out a number of utxos that are expected in other tests
|
||||
test_small_output_with_feerate_succeeds(self, rbf_node, dest_address)
|
||||
@@ -532,31 +530,6 @@ def test_dust_to_fee(self, rbf_node, dest_address):
|
||||
assert_equal(full_bumped_tx["vout"][0]['value'], Decimal("0.00050000"))
|
||||
self.clear_mempool()
|
||||
|
||||
|
||||
def test_settxfee(self, rbf_node, dest_address):
|
||||
self.log.info('Test settxfee')
|
||||
assert_raises_rpc_error(-8, "txfee cannot be less than min relay tx fee", rbf_node.settxfee, Decimal('0.0000005'))
|
||||
assert_raises_rpc_error(-8, "txfee cannot be less than wallet min fee", rbf_node.settxfee, Decimal('0.000015'))
|
||||
# check that bumpfee reacts correctly to the use of settxfee (paytxfee)
|
||||
rbfid = spend_one_input(rbf_node, dest_address)
|
||||
requested_feerate = Decimal("0.00025000")
|
||||
rbf_node.settxfee(requested_feerate)
|
||||
bumped_tx = rbf_node.bumpfee(rbfid)
|
||||
actual_feerate = bumped_tx["fee"] * 1000 / rbf_node.getrawtransaction(bumped_tx["txid"], True)["vsize"]
|
||||
# Assert that the difference between the requested feerate and the actual
|
||||
# feerate of the bumped transaction is small.
|
||||
assert_greater_than(Decimal("0.00001000"), abs(requested_feerate - actual_feerate))
|
||||
rbf_node.settxfee(Decimal("0.00000000")) # unset paytxfee
|
||||
|
||||
# check that settxfee respects -maxtxfee
|
||||
self.restart_node(1, ['-maxtxfee=0.000025'] + self.extra_args[1])
|
||||
assert_raises_rpc_error(-8, "txfee cannot be more than wallet max tx fee", rbf_node.settxfee, Decimal('0.00003'))
|
||||
self.restart_node(1, self.extra_args[1])
|
||||
rbf_node.walletpassphrase(WALLET_PASSPHRASE, WALLET_PASSPHRASE_TIMEOUT)
|
||||
self.connect_nodes(1, 0)
|
||||
self.clear_mempool()
|
||||
|
||||
|
||||
def test_maxtxfee_fails(self, rbf_node, dest_address):
|
||||
self.log.info('Test that bumpfee fails when it hits -maxtxfee')
|
||||
# size of bumped transaction (p2wpkh, 1 input, 2 outputs): 141 vbytes
|
||||
|
||||
Reference in New Issue
Block a user