mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
Merge #7558: [RPC] Add import/removeprunedfunds rpc call
f1bb13cAdded companion removeprunedfunds call. (instagibbs)7eb7029Add importprunedfunds rpc call (instagibbs)
This commit is contained in:
@@ -2353,6 +2353,31 @@ DBErrors CWallet::LoadWallet(bool& fFirstRunRet)
|
||||
return DB_LOAD_OK;
|
||||
}
|
||||
|
||||
DBErrors CWallet::ZapSelectTx(vector<uint256>& vHashIn, vector<uint256>& vHashOut)
|
||||
{
|
||||
if (!fFileBacked)
|
||||
return DB_LOAD_OK;
|
||||
DBErrors nZapSelectTxRet = CWalletDB(strWalletFile,"cr+").ZapSelectTx(this, vHashIn, vHashOut);
|
||||
if (nZapSelectTxRet == DB_NEED_REWRITE)
|
||||
{
|
||||
if (CDB::Rewrite(strWalletFile, "\x04pool"))
|
||||
{
|
||||
LOCK(cs_wallet);
|
||||
setKeyPool.clear();
|
||||
// Note: can't top-up keypool here, because wallet is locked.
|
||||
// User will be prompted to unlock wallet the next operation
|
||||
// that requires a new key.
|
||||
}
|
||||
}
|
||||
|
||||
if (nZapSelectTxRet != DB_LOAD_OK)
|
||||
return nZapSelectTxRet;
|
||||
|
||||
MarkDirty();
|
||||
|
||||
return DB_LOAD_OK;
|
||||
|
||||
}
|
||||
|
||||
DBErrors CWallet::ZapWalletTx(std::vector<CWalletTx>& vWtx)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user