Page MenuHomePhabricator

Merge #12424: Fix rescan test failure due to unset g_address_type, g_change_type
ClosedPublic

Authored by markblundeberg on Jul 2 2019, 23:41.

Details

Summary

PR12424 backport https://github.com/bitcoin/bitcoin/pull/12424/files
b7f6002ed5 Fix rescan test failure due to unset g_address_type, g_change_type (Russell Yanofsky)

Pull request description:

New global variables were introduced in #11403 and not setting them causes:

```
test_bitcoin: wallet/wallet.cpp:4259: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed.
unknown location(0): fatal error in "importwallet_rescan": signal: SIGABRT (application abort requested)
```

It's possible to reproduce the failure reliably by running:

```
src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/importwallet_rescan
```

Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.

This is similar to bug #12150. Example travis failure is https://travis-ci.org/bitcoin/bitcoin/jobs/340642010
Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markblundeberg created this revision.Jul 2 2019, 23:41
Herald added a reviewer: Restricted Project. · View Herald TranscriptJul 2 2019, 23:41
This revision is now accepted and ready to land.Jul 3 2019, 02:26