HomePhabricator

test: fix intermittent mempool_unbroadcast txn-mempool-conflict

Description

test: fix intermittent mempool_unbroadcast txn-mempool-conflict

Summary:
A list of available UTXOs was generated, then a transaction was generated with sendtoaddress, then a second transaction was constructed from the first UTXO in the list. Due to the randomness in the coin selection algorithm, there was no guarantee that the transactions didn't spend the same UTXO.

This revision makes sure that the list of available UTXOs used to construct the second transaction is requested from the node after it has already sent the first transaction. This should guarantee that the second transaction never spends the same UTXO.

Test Plan: for i in {1..20}; do test/functional/test_runner.py mempool_u*; done

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D9022

Details

Provenance
PiRKAuthored on Jan 22 2021, 01:29
PiRKPushed on Jan 22 2021, 08:23
Reviewer
Restricted Project
Differential Revision
D9022: test: fix intermittent mempool_unbroadcast txn-mempool-conflict
Parents
rABC0a34961f68bd: [Cashtab] Reject transactions lower than backend dust limit
Branches
Unknown
Tags
Unknown