diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-02-27 13:15:39 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-02-28 11:40:50 +0100 |
commit | 50953c2aadca85c8664eac612072b0df98fceee7 (patch) | |
tree | 24ca84f5d42274903dd5dd086fa32ba1307a8c84 | |
parent | eddaa6b35d41aefead1a57ea54e7e15ce069f79a (diff) |
tests: Fix dangling pwalletMain pointer in wallet tests
Github-Pull: #9875
Rebased-From: 75a109338fbbe9a30c54d76010b538c8ac1080ac
-rw-r--r-- | src/wallet/test/wallet_tests.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index d32e8ba06a..43d7e3c617 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -397,6 +397,7 @@ BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup) { CWallet wallet; + CWallet *backup = ::pwalletMain; ::pwalletMain = &wallet; UniValue key; key.setObject(); @@ -412,6 +413,7 @@ BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup) UniValue response = importmulti(request); BOOST_CHECK_EQUAL(response.write(), strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}}]", newTip->GetBlockTimeMax())); + ::pwalletMain = backup; } } |