HomePhabricator

test: wallet_backup.py, fix intermittent failure in "restore using dumped…

Description

test: wallet_backup.py, fix intermittent failure in "restore using dumped wallet"

Summary:

The failure arises because the test expects 'init_wallet()' (the test
framework function) creating a wallet with no keys. However, the function also imports the deterministic private key used to receive the coinbase coins.

This causes a race within the "restore using dumped wallet" case, where we intend to have a new wallet (with no existing keys) to test the 'importwallet()' RPC result.
The reason behind the intermittent failures might be other peers delivering the chain right after node2 startup (sync of the validation queue included) and prior to the 'node2.getbalance()' check.

Backport of core#28325.

Test Plan:

./test/functional/test_runner.py wallet_backup

Reviewers: #bitcoin_abc, bytesofman

Reviewed By: #bitcoin_abc, bytesofman

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

Details

Provenance
furszy <matiasfurszyfer@protonmail.com>Authored on Aug 22 2023, 14:51
FabienCommitted on Aug 14 2024, 13:31
FabienPushed on Aug 14 2024, 13:31
Reviewer
Restricted Project
Differential Revision
D16643: test: wallet_backup.py, fix intermittent failure in "restore using dumped wallet"
Parents
rABCb05a734b5c0d: Add dust tx authentication prefix to standards doc
Branches
Unknown
Tags
Unknown