HomePhabricator

Rename wallet database classes

Description

Rename wallet database classes

Summary:
This is a backport of Core PR11851:

  • 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-

  • Update walletdb comment after renaming.

Text from https://github.com/bitcoin/bitcoin/pull/11851#issuecomment-350320608
by John Newbery <john@johnnewbery.com>.

  • Add m_ prefix to WalletBatch::m_batch

Test Plan:

make check
test/functional/test_runner.py --extended

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D3618

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Dec 8 2017, 11:39
deadalnixCommitted on Jul 10 2019, 18:11
FabienPushed on Jul 10 2019, 19:16
Reviewer
Restricted Project
Differential Revision
D3618: Rename wallet database classes
Parents
rSTAGING94d4e0a15975: wallet: Initialize m_last_block_processed to nullptr. Initialize fields where…
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/10211