mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 07:09:15 +01:00
wallet: don't read db every time that a new WalletBatch is created
Better to perform the action only one time (during 'LoadWallet'). Where the value is being used.
This commit is contained in:
@@ -315,12 +315,6 @@ BerkeleyBatch::BerkeleyBatch(BerkeleyDatabase& database, const bool read_only, b
|
||||
env = database.env.get();
|
||||
pdb = database.m_db.get();
|
||||
strFile = fs::PathToString(database.m_filename);
|
||||
if (!Exists(std::string("version"))) {
|
||||
bool fTmp = fReadOnly;
|
||||
fReadOnly = false;
|
||||
Write(std::string("version"), CLIENT_VERSION);
|
||||
fReadOnly = fTmp;
|
||||
}
|
||||
}
|
||||
|
||||
void BerkeleyDatabase::Open()
|
||||
|
||||
Reference in New Issue
Block a user