Page MenuHomePhabricator

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

Authored by Fabien on Aug 14 2024, 07:53.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable