diff options
author | furszy <matiasfurszyfer@protonmail.com> | 2022-06-16 10:30:04 -0300 |
---|---|---|
committer | furszy <matiasfurszyfer@protonmail.com> | 2022-06-16 12:18:58 -0300 |
commit | bda8ebe608e6572eaaf40cd28dab6954241c9b0d (patch) | |
tree | bdedaa087c63574520f8c0c33831599f4212539f /src/wallet/bdb.cpp | |
parent | 26ec2f2d6bb12525044b6d09422b42715fc09319 (diff) | |
download | bitcoin-bda8ebe608e6572eaaf40cd28dab6954241c9b0d.tar.xz |
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.
Diffstat (limited to 'src/wallet/bdb.cpp')
-rw-r--r-- | src/wallet/bdb.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/wallet/bdb.cpp b/src/wallet/bdb.cpp index f8230f7a1d..dbd768a758 100644 --- a/src/wallet/bdb.cpp +++ b/src/wallet/bdb.cpp @@ -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() |