diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-08-24 13:52:17 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-08-24 13:44:07 +0200 |
commit | fa347b2f2570a9436313a7c5d61015f2088662f4 (patch) | |
tree | dde99a4c656139c1c9eacf39beae5948d1befbd5 /test/functional/wallet_bumpfee.py | |
parent | 1d53d72948e39ad2d099a6cf2488d5652e7a1f23 (diff) | |
download | bitcoin-fa347b2f2570a9436313a7c5d61015f2088662f4.tar.xz |
test: Select at least the fee in wallet_bumpfee to avoid negative amounts
Diffstat (limited to 'test/functional/wallet_bumpfee.py')
-rwxr-xr-x | test/functional/wallet_bumpfee.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/wallet_bumpfee.py b/test/functional/wallet_bumpfee.py index 53496084ef..11dbb38369 100755 --- a/test/functional/wallet_bumpfee.py +++ b/test/functional/wallet_bumpfee.py @@ -211,14 +211,15 @@ def test_notmine_bumpfee_fails(self, rbf_node, peer_node, dest_address): # here, the rbftx has a peer_node coin and then adds a rbf_node input # Note that this test depends upon the RPC code checking input ownership prior to change outputs # (since it can't use fundrawtransaction, it lacks a proper change output) - utxos = [node.listunspent()[-1] for node in (rbf_node, peer_node)] + fee = Decimal("0.001") + utxos = [node.listunspent(query_options={'minimumAmount': fee})[-1] for node in (rbf_node, peer_node)] inputs = [{ "txid": utxo["txid"], "vout": utxo["vout"], "address": utxo["address"], "sequence": BIP125_SEQUENCE_NUMBER } for utxo in utxos] - output_val = sum(utxo["amount"] for utxo in utxos) - Decimal("0.001") + output_val = sum(utxo["amount"] for utxo in utxos) - fee rawtx = rbf_node.createrawtransaction(inputs, {dest_address: output_val}) signedtx = rbf_node.signrawtransactionwithwallet(rawtx) signedtx = peer_node.signrawtransactionwithwallet(signedtx["hex"]) |