aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2017-02-27 13:25:08 +0100
committerWladimir J. van der Laan <[email protected]>2017-02-27 13:38:51 +0100
commit94e5ba9ba2901c8205c1814ece8e2fafbff63a03 (patch)
treebb91b2147041f8ba65dd620b29da4e0b6afac326 /src
parentMerge #9839: [qa] Make import-rescan.py watchonly check reliable (diff)
parenttests: Fix dangling pwalletMain pointer in wallet tests (diff)
downloaddiscoin-94e5ba9ba2901c8205c1814ece8e2fafbff63a03.tar.xz
discoin-94e5ba9ba2901c8205c1814ece8e2fafbff63a03.zip
Merge #9875: tests: Fix dangling pwalletMain pointer in wallet tests
75a1093 tests: Fix dangling pwalletMain pointer in wallet tests (Wladimir J. van der Laan) Tree-SHA512: 7fb6e8385fe7d542f9ecb113a08d675ca9e84907a1939b3a6ad41318fda55bc999b9bc8ffc3f56cd8610ca49d0db982d3c793df7bbcb7eb9638f4483030db6a8
Diffstat (limited to 'src')
-rw-r--r--src/wallet/test/wallet_tests.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp
index d32e8ba06..43d7e3c61 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;
}
}