Skip to content

Commit f1b4503

Browse files
committed
bumpfee test: exit loop at proper time with new fee value being compared
1 parent 2e4edc6 commit f1b4503

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/functional/wallet_bumpfee.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ def test_small_output_with_feerate_succeeds(self, rbf_node, dest_address):
222222
input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
223223
assert_equal(len(input_list), 1)
224224
original_txin = input_list[0]
225-
self.log.info('Keep bumping until transaction fee out-spends change output amount')
225+
self.log.info('Keep bumping until transaction fee out-spends non-destination value')
226226
tx_fee = 0
227-
while tx_fee < Decimal("0.0005"):
227+
while True:
228228
input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]
229229
new_item = list(input_list)[0]
230230
assert_equal(len(input_list), 1)
@@ -236,7 +236,11 @@ def test_small_output_with_feerate_succeeds(self, rbf_node, dest_address):
236236
assert rbfid not in raw_pool
237237
assert rbfid_new in raw_pool
238238
rbfid = rbfid_new
239-
tx_fee = rbfid_new_details["origfee"]
239+
tx_fee = rbfid_new_details["fee"]
240+
241+
# Total value from input not going to destination
242+
if tx_fee > Decimal('0.00050000'):
243+
break
240244

241245
# input(s) have been added
242246
final_input_list = rbf_node.getrawtransaction(rbfid, 1)["vin"]

0 commit comments

Comments
 (0)