diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-03-03 10:26:48 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-03-03 10:26:55 -0500 |
commit | 6012f1caf744ac9b53383d7d10a8f1b70ca2c0e1 (patch) | |
tree | adb37789de58d15727ab81ff14dc64763f2ab5a5 /src/qt/test/wallettests.cpp | |
parent | ded6a2afa549f693dcabb430ce0862f8631360c8 (diff) | |
parent | 7ba2d5785251c90c5fea134917a4f53a3f632b9a (diff) |
Merge #12582: Fix ListCoins test failure due to unset g_wallet_allow_fallback_fee
7ba2d57852 Fix ListCoins test failure due to unset g_wallet_allow_fallback_fee (Russell Yanofsky)
Pull request description:
New global variable was introduced in #11882 and not setting it causes:
```
wallet/test/wallet_tests.cpp(638): error in "ListCoins": check wallet->CreateTransaction({recipient}, wtx, reservekey, fee, changePos, error, dummy) failed
wallet/test/wallet_tests.cpp(679): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2]
wallet/test/wallet_tests.cpp(686): error in "ListCoins": check available.size() == 2 failed [1 != 2]
wallet/test/wallet_tests.cpp(705): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2]
```
It's possible to reproduce the failure reliably by running:
```
src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins
```
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 bugs #12150 and #12424. Example travis failures are:
https://travis-ci.org/bitcoin/bitcoin/jobs/348296805#L2676
https://travis-ci.org/bitcoin/bitcoin/jobs/348362560#L2769
https://travis-ci.org/bitcoin/bitcoin/jobs/348362563#L2824
Tree-SHA512: ca37b554a75c12ac2d534de62bf74eb9e0b29e4399ebf1fa10053a40887e55e9e7135f754a01e5a67499cc8677ae226542146b370b1e83d08bb63d79ff379073
Diffstat (limited to 'src/qt/test/wallettests.cpp')
-rw-r--r-- | src/qt/test/wallettests.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/qt/test/wallettests.cpp b/src/qt/test/wallettests.cpp index 0dc557e3a9..cd49292138 100644 --- a/src/qt/test/wallettests.cpp +++ b/src/qt/test/wallettests.cpp @@ -158,8 +158,6 @@ void TestGUI() test.CreateAndProcessBlock({}, GetScriptForRawPubKey(test.coinbaseKey.GetPubKey())); } bitdb.MakeMock(); - g_wallet_allow_fallback_fee = true; - std::unique_ptr<CWalletDBWrapper> dbw(new CWalletDBWrapper(&bitdb, "wallet_test.dat")); CWallet wallet(std::move(dbw)); bool firstRun; |