mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-11 20:32:35 -03:00
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.
This commit is contained in:
parent
da039d2a91
commit
0fcff547d5
1 changed files with 1 additions and 1 deletions
|
@ -767,7 +767,7 @@ bool BerkeleyBatch::ReadKey(CDataStream&& key, CDataStream& value)
|
||||||
bool BerkeleyBatch::WriteKey(CDataStream&& key, CDataStream&& value, bool overwrite)
|
bool BerkeleyBatch::WriteKey(CDataStream&& key, CDataStream&& value, bool overwrite)
|
||||||
{
|
{
|
||||||
if (!pdb)
|
if (!pdb)
|
||||||
return true;
|
return false;
|
||||||
if (fReadOnly)
|
if (fReadOnly)
|
||||||
assert(!"Write called on database in read-only mode");
|
assert(!"Write called on database in read-only mode");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue