mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
[test]: keep the list of confirmed utxos up to date in RBF test
This commit is contained in:
parent
1595dc612c
commit
3e008d3e3e
1 changed files with 10 additions and 1 deletions
|
@ -273,6 +273,11 @@ class EstimateFeeTest(BitcoinTestFramework):
|
|||
# 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:
|
||||
|
@ -286,12 +291,16 @@ class EstimateFeeTest(BitcoinTestFramework):
|
|||
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)
|
||||
|
|
Loading…
Add table
Reference in a new issue