diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2023-03-23 16:37:06 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2023-03-23 17:06:54 -0300 |
commit | 8aab5157c55249c9023ae4e9654f5d42aaa4f314 (patch) | |
tree | bda90cfa06fefd19b21381cfd1624e9f5e033229 /test/functional | |
parent | 23056436461a8b3af1a504b9638c48e8c8170652 (diff) |
test: wallet_create_tx.py fix race
Because wallets are internally synchronized
through the validation interface, and the
interface dispatches events on a worker thread,
it is possible for a transaction created by the
first wallet to not arrive at the second wallet
before the second wallet attempts to use one of
its outputs. This is because we do not wait for
the BroadcastTransaction callback during the wallet's
"submit to mempool" process. To address this in the
tests, we need to sync the validation queue.
Diffstat (limited to 'test/functional')
-rwxr-xr-x | test/functional/wallet_create_tx.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/functional/wallet_create_tx.py b/test/functional/wallet_create_tx.py index 11c82e15b7..4e31b48ec0 100755 --- a/test/functional/wallet_create_tx.py +++ b/test/functional/wallet_create_tx.py @@ -92,6 +92,7 @@ class CreateTxWalletTest(BitcoinTestFramework): txid = tx_data['txid'] vout = 1 + self.nodes[0].syncwithvalidationinterfacequeue() options = {"change_position": 0, "add_inputs": False} for i in range(1, 25): options['inputs'] = [{'txid': txid, 'vout': vout}] |