mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 12:55:02 +02:00
Disable CWalletTx copy constructor
Disable copying of CWalletTx objects to prevent bugs where instances get copied in and out of the mapWallet map and fields are updated in the wrong copy.
This commit is contained in:
@@ -3096,7 +3096,7 @@ DBErrors CWallet::ZapSelectTx(std::vector<uint256>& vHashIn, std::vector<uint256
|
||||
return DBErrors::LOAD_OK;
|
||||
}
|
||||
|
||||
DBErrors CWallet::ZapWalletTx(std::vector<CWalletTx>& vWtx)
|
||||
DBErrors CWallet::ZapWalletTx(std::list<CWalletTx>& vWtx)
|
||||
{
|
||||
DBErrors nZapWalletTxRet = WalletBatch(*database,"cr+").ZapWalletTx(vWtx);
|
||||
if (nZapWalletTxRet == DBErrors::NEED_REWRITE)
|
||||
@@ -3708,7 +3708,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
|
||||
const std::string walletFile = WalletDataFilePath(location.GetPath()).string();
|
||||
|
||||
// needed to restore wallet transaction meta data after -zapwallettxes
|
||||
std::vector<CWalletTx> vWtx;
|
||||
std::list<CWalletTx> vWtx;
|
||||
|
||||
if (gArgs.GetBoolArg("-zapwallettxes", false)) {
|
||||
chain.initMessage(_("Zapping all transactions from wallet...").translated);
|
||||
|
||||
Reference in New Issue
Block a user