mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Use DB Transactions when encrypting wallet.
This speeds up the encryption process significantly.
This commit is contained in:
@@ -18,6 +18,8 @@ private:
|
||||
bool SelectCoinsMinConf(int64 nTargetValue, int nConfMine, int nConfTheirs, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const;
|
||||
bool SelectCoins(int64 nTargetValue, std::set<std::pair<const CWalletTx*,unsigned int> >& setCoinsRet, int64& nValueRet) const;
|
||||
|
||||
CWalletDB *pwalletdbEncryption;
|
||||
CCriticalSection cs_pwalletdbEncryption;
|
||||
|
||||
public:
|
||||
bool fFileBacked;
|
||||
@@ -34,12 +36,14 @@ public:
|
||||
{
|
||||
fFileBacked = false;
|
||||
nMasterKeyMaxID = 0;
|
||||
pwalletdbEncryption = NULL;
|
||||
}
|
||||
CWallet(std::string strWalletFileIn)
|
||||
{
|
||||
strWalletFile = strWalletFileIn;
|
||||
fFileBacked = true;
|
||||
nMasterKeyMaxID = 0;
|
||||
pwalletdbEncryption = NULL;
|
||||
}
|
||||
|
||||
mutable CCriticalSection cs_mapWallet;
|
||||
|
||||
Reference in New Issue
Block a user