aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r--src/wallet/wallet.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h
index 22a0ac2924..170e60d485 100644
--- a/src/wallet/wallet.h
+++ b/src/wallet/wallet.h
@@ -666,7 +666,7 @@ private:
std::mutex mutexScanning;
friend class WalletRescanReserver;
- CWalletDB *pwalletdbEncryption = nullptr;
+ WalletBatch *encrypted_batch = nullptr;
//! the current wallet version: clients below this version are not able to load the wallet
int nWalletVersion = FEATURE_BASE;
@@ -701,7 +701,7 @@ private:
CHDChain hdChain;
/* HD derive new child key (on internal or external chain) */
- void DeriveNewChildKey(CWalletDB &walletdb, CKeyMetadata& metadata, CKey& secret, bool internal = false);
+ void DeriveNewChildKey(WalletBatch &batch, CKeyMetadata& metadata, CKey& secret, bool internal = false);
std::set<int64_t> setInternalKeyPool;
std::set<int64_t> setExternalKeyPool;
@@ -729,7 +729,7 @@ private:
std::string m_name;
/** Internal database handle. */
- std::unique_ptr<CWalletDBWrapper> dbw;
+ std::unique_ptr<WalletDatabase> database;
/**
* The following is used to keep track of how far behind the wallet is
@@ -753,9 +753,9 @@ public:
/** Get database handle used by this wallet. Ideally this function would
* not be necessary.
*/
- CWalletDBWrapper& GetDBHandle()
+ WalletDatabase& GetDBHandle()
{
- return *dbw;
+ return *database;
}
/**
@@ -783,14 +783,14 @@ public:
unsigned int nMasterKeyMaxID = 0;
/** Construct wallet with specified name and database implementation. */
- CWallet(std::string name, std::unique_ptr<CWalletDBWrapper> dbw) : m_name(std::move(name)), dbw(std::move(dbw))
+ CWallet(std::string name, std::unique_ptr<WalletDatabase> database) : m_name(std::move(name)), database(std::move(database))
{
}
~CWallet()
{
- delete pwalletdbEncryption;
- pwalletdbEncryption = nullptr;
+ delete encrypted_batch;
+ encrypted_batch = nullptr;
}
std::map<uint256, CWalletTx> mapWallet;
@@ -856,10 +856,10 @@ public:
* keystore implementation
* Generate a new key
*/
- CPubKey GenerateNewKey(CWalletDB& walletdb, bool internal = false);
+ CPubKey GenerateNewKey(WalletBatch& batch, bool internal = false);
//! Adds a key to the store, and saves it to disk.
bool AddKeyPubKey(const CKey& key, const CPubKey &pubkey) override;
- bool AddKeyPubKeyWithDB(CWalletDB &walletdb,const CKey& key, const CPubKey &pubkey);
+ bool AddKeyPubKeyWithDB(WalletBatch &batch,const CKey& key, const CPubKey &pubkey);
//! Adds a key to the store, without saving it to disk (used by LoadWallet)
bool LoadKey(const CKey& key, const CPubKey &pubkey) { return CCryptoKeyStore::AddKeyPubKey(key, pubkey); }
//! Load metadata (used by LoadWallet)
@@ -907,7 +907,7 @@ public:
* Increment the next transaction order id
* @return next transaction order id
*/
- int64_t IncOrderPosNext(CWalletDB *pwalletdb = nullptr);
+ int64_t IncOrderPosNext(WalletBatch *batch = nullptr);
DBErrors ReorderTransactions();
bool AccountMove(std::string strFrom, std::string strTo, CAmount nAmount, std::string strComment = "");
bool GetLabelDestination(CTxDestination &dest, const std::string& label, bool bForceNew = false);
@@ -955,7 +955,7 @@ public:
void ListAccountCreditDebit(const std::string& strAccount, std::list<CAccountingEntry>& entries);
bool AddAccountingEntry(const CAccountingEntry&);
- bool AddAccountingEntry(const CAccountingEntry&, CWalletDB *pwalletdb);
+ bool AddAccountingEntry(const CAccountingEntry&, WalletBatch *batch);
bool DummySignTx(CMutableTransaction &txNew, const std::set<CTxOut> &txouts) const
{
std::vector<CTxOut> v_txouts(txouts.size());
@@ -1039,7 +1039,7 @@ public:
}
//! signify that a particular wallet feature is now used. this may change nWalletVersion and nWalletMaxVersion if those are lower
- bool SetMinVersion(enum WalletFeature, CWalletDB* pwalletdbIn = nullptr, bool fExplicit = false);
+ bool SetMinVersion(enum WalletFeature, WalletBatch* batch_in = nullptr, bool fExplicit = false);
//! change which version we're allowed to upgrade to (note that this does not immediately imply upgrading to that format)
bool SetMaxVersion(int nVersion);