mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge pull request #4805
44bc988 [Wallet] Do not flush the wallet in AddToWalletIfInvolvingMe(..) (Cozz Lovan)
This commit is contained in:
commit
8204e19abe
8 changed files with 30 additions and 19 deletions
|
|
@ -217,10 +217,11 @@ void CDBEnv::CheckpointLSN(const std::string& strFile)
|
|||
}
|
||||
|
||||
|
||||
CDB::CDB(const std::string& strFilename, const char* pszMode) : pdb(NULL), activeTxn(NULL)
|
||||
CDB::CDB(const std::string& strFilename, const char* pszMode, bool fFlushOnCloseIn) : pdb(NULL), activeTxn(NULL)
|
||||
{
|
||||
int ret;
|
||||
fReadOnly = (!strchr(pszMode, '+') && !strchr(pszMode, 'w'));
|
||||
fFlushOnClose = fFlushOnCloseIn;
|
||||
if (strFilename.empty())
|
||||
return;
|
||||
|
||||
|
|
@ -297,7 +298,8 @@ void CDB::Close()
|
|||
activeTxn = NULL;
|
||||
pdb = NULL;
|
||||
|
||||
Flush();
|
||||
if (fFlushOnClose)
|
||||
Flush();
|
||||
|
||||
{
|
||||
LOCK(bitdb.cs_db);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue