diff options
author | Russell Yanofsky <russ@yanofsky.org> | 2017-12-08 06:39:22 -0500 |
---|---|---|
committer | Russell Yanofsky <russ@yanofsky.org> | 2018-04-07 11:48:27 -0500 |
commit | ea23945dbc6ad239c5acac374d2b54aa12870838 (patch) | |
tree | d2ce7e636037accf153bcca2c4b170b91d1e0dd2 /src/wallet/init.cpp | |
parent | b2e5fe8b559b2f6561ee8f220e9141e401929f5e (diff) |
scripted-diff: Rename wallet database classes
-BEGIN VERIFY SCRIPT-
sed -i 's/\<CWalletDBWrapper\>/BerkeleyDatabase/g' src/wallet/db.h src/wallet/db.cpp
sed -i '/statuses/i/** Backend-agnostic database type. */\nusing WalletDatabase = BerkeleyDatabase\;\n' src/wallet/walletdb.h
ren() { git grep -l "\<$1\>" 'src/*.cpp' 'src/*.h' ':(exclude)*dbwrapper*' test | xargs sed -i "s:\<$1\>:$2:g"; }
ren CDBEnv BerkeleyEnvironment
ren CDB BerkeleyBatch
ren CWalletDBWrapper WalletDatabase
ren CWalletDB WalletBatch
ren dbw database
ren m_dbw m_database
ren walletdb batch
ren pwalletdb batch
ren pwalletdbIn batch_in
ren wallet/batch.h wallet/walletdb.h
ren pwalletdbEncryption encrypted_batch
-END VERIFY SCRIPT-
Diffstat (limited to 'src/wallet/init.cpp')
-rw-r--r-- | src/wallet/init.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp index c860eede05..b6f4a0e1e1 100644 --- a/src/wallet/init.cpp +++ b/src/wallet/init.cpp @@ -277,21 +277,21 @@ bool WalletInit::Verify() } std::string strError; - if (!CWalletDB::VerifyEnvironment(wallet_path, strError)) { + if (!WalletBatch::VerifyEnvironment(wallet_path, strError)) { return InitError(strError); } if (gArgs.GetBoolArg("-salvagewallet", false)) { // Recover readable keypairs: - CWallet dummyWallet("dummy", CWalletDBWrapper::CreateDummy()); + CWallet dummyWallet("dummy", WalletDatabase::CreateDummy()); std::string backup_filename; - if (!CWalletDB::Recover(wallet_path, (void *)&dummyWallet, CWalletDB::RecoverKeysOnlyFilter, backup_filename)) { + if (!WalletBatch::Recover(wallet_path, (void *)&dummyWallet, WalletBatch::RecoverKeysOnlyFilter, backup_filename)) { return false; } } std::string strWarning; - bool dbV = CWalletDB::VerifyDatabaseFile(wallet_path, strWarning, strError); + bool dbV = WalletBatch::VerifyDatabaseFile(wallet_path, strWarning, strError); if (!strWarning.empty()) { InitWarning(strWarning); } |