aboutsummaryrefslogtreecommitdiff
path: root/src/test/dbwrapper_tests.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2016-04-25 12:44:58 +0200
committerWladimir J. van der Laan <[email protected]>2016-04-25 12:46:23 +0200
commitf9c2ac72327e611361cb6cd707b770f161238701 (patch)
treee38e07ed138c50ba8afda6cd306e7b651e77b734 /src/test/dbwrapper_tests.cpp
parentMerge #7925: qt: Fix out-of-tree GUI builds (diff)
parentdbwrapper: Move `HandleError` to `dbwrapper_private` (diff)
downloaddiscoin-f9c2ac72327e611361cb6cd707b770f161238701.tar.xz
discoin-f9c2ac72327e611361cb6cd707b770f161238701.zip
Merge #7927: Minor changes to dbwrapper to simplify support for other databases
869cf12 dbwrapper: Move `HandleError` to `dbwrapper_private` (Wladimir J. van der Laan) b69836d dbwrapper: Pass parent CDBWrapper into CDBBatch and CDBIterator (Wladimir J. van der Laan) 878bf48 dbwrapper: Remove CDBWrapper::GetObfuscateKeyHex (Wladimir J. van der Laan) 74f7b12 dbwrapper: Remove throw keywords in function signatures (Wladimir J. van der Laan)
Diffstat (limited to 'src/test/dbwrapper_tests.cpp')
-rw-r--r--src/test/dbwrapper_tests.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp
index e39931587..081d57831 100644
--- a/src/test/dbwrapper_tests.cpp
+++ b/src/test/dbwrapper_tests.cpp
@@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper)
uint256 res;
// Ensure that we're doing real obfuscation when obfuscate=true
- BOOST_CHECK(obfuscate != is_null_key(dbw.GetObfuscateKey()));
+ BOOST_CHECK(obfuscate != is_null_key(dbwrapper_private::GetObfuscateKey(dbw)));
BOOST_CHECK(dbw.Write(key, in));
BOOST_CHECK(dbw.Read(key, res));
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE(dbwrapper_batch)
uint256 in3 = GetRandHash();
uint256 res;
- CDBBatch batch(&dbw.GetObfuscateKey());
+ CDBBatch batch(dbw);
batch.Write(key, in);
batch.Write(key2, in2);
@@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE(existing_data_no_obfuscate)
BOOST_CHECK_EQUAL(res2.ToString(), in.ToString());
BOOST_CHECK(!odbw.IsEmpty()); // There should be existing data
- BOOST_CHECK(is_null_key(odbw.GetObfuscateKey())); // The key should be an empty string
+ BOOST_CHECK(is_null_key(dbwrapper_private::GetObfuscateKey(odbw))); // The key should be an empty string
uint256 in2 = GetRandHash();
uint256 res3;
@@ -193,7 +193,7 @@ BOOST_AUTO_TEST_CASE(existing_data_reindex)
// Check that the key/val we wrote with unobfuscated wrapper doesn't exist
uint256 res2;
BOOST_CHECK(!odbw.Read(key, res2));
- BOOST_CHECK(!is_null_key(odbw.GetObfuscateKey()));
+ BOOST_CHECK(!is_null_key(dbwrapper_private::GetObfuscateKey(odbw)));
uint256 in2 = GetRandHash();
uint256 res3;