Skip to content

Commit

Permalink
[test]: keep the list of confirmed utxos up to date in RBF test
Browse files Browse the repository at this point in the history
  • Loading branch information
darosior authored and ismaelsadeeq committed May 14, 2024
1 parent a6e8133 commit 3e50d13
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/functional/feature_fee_estimation.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ def sanity_check_rbf_estimates(self, utxos):
# Broadcast 5 low fee transaction which don't need to
for _ in range(5):
tx = make_tx(self.wallet, utxos.pop(0), low_feerate)
self.confutxo.append({
"txid": tx["txid"],
"vout": 0,
"value": Decimal(tx["tx"].vout[0].nValue) / COIN
})
txs.append(tx)
batch_send_tx = [node.sendrawtransaction.get_request(tx["hex"]) for tx in txs]
for n in self.nodes:
Expand All @@ -278,12 +283,16 @@ def sanity_check_rbf_estimates(self, utxos):
while len(utxos_to_respend) > 0:
u = utxos_to_respend.pop(0)
tx = make_tx(self.wallet, u, high_feerate)
self.confutxo.append({
"txid": tx["txid"],
"vout": 0,
"value": Decimal(tx["tx"].vout[0].nValue) / COIN
})
node.sendrawtransaction(tx["hex"])
txs.append(tx)
dec_txs = [res["result"] for res in node.batch([node.decoderawtransaction.get_request(tx["hex"]) for tx in txs])]
self.wallet.scan_txs(dec_txs)


# Mine the last replacement txs
self.sync_mempools(wait=0.1, nodes=[node, miner])
self.generate(miner, 1)
Expand Down

0 comments on commit 3e50d13

Please sign in to comment.