diff options
author | Andrew Chow <achow101-github@achow101.com> | 2020-06-18 11:28:39 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-07-29 12:30:24 -0400 |
commit | 0fcff547d5b47822c13104978fda0c486e596526 (patch) | |
tree | 79da9cbc24f2b0541849bb0867a3e6bc60b20e43 /src/wallet/bdb.cpp | |
parent | da039d2a915097c23f2b46e063042409bdc3c4f4 (diff) |
walletdb: Ensure that having no database handle is a failure
Previously having no database handle could still be considered a success
when BerkeleyDatabase and BerkeleyBatch were used for dummy database
things. With dedicated DummyDatabase and DummyBatch classes now, these
should fail.
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r-- | src/wallet/bdb.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index 3178a7b47a..a04311fdf5 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -767,7 +767,7 @@ bool BerkeleyBatch::ReadKey(CDataStream&& key, CDataStream& value) bool BerkeleyBatch::WriteKey(CDataStream&& key, CDataStream&& value, bool overwrite) { if (!pdb) - return true; + return false; if (fReadOnly) assert(!"Write called on database in read-only mode"); |