@@ -659,20 +659,17 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
659
659
return result;
660
660
}
661
661
662
- DBErrors CWalletDB::FindWalletTx (CWallet* pwallet, vector<uint256>& vTxHash, vector<CWalletTx>& vWtx)
662
+ DBErrors CWalletDB::FindWalletTx (vector<uint256>& vTxHash, vector<CWalletTx>& vWtx)
663
663
{
664
- pwallet->vchDefaultKey = CPubKey ();
665
664
bool fNoncriticalErrors = false ;
666
665
DBErrors result = DB_LOAD_OK;
667
666
668
667
try {
669
- LOCK (pwallet->cs_wallet );
670
668
int nMinVersion = 0 ;
671
669
if (Read ((string)" minversion" , nMinVersion))
672
670
{
673
671
if (nMinVersion > CLIENT_VERSION)
674
672
return DB_TOO_NEW;
675
- pwallet->LoadMinVersion (nMinVersion);
676
673
}
677
674
678
675
// Get cursor
@@ -725,12 +722,12 @@ DBErrors CWalletDB::FindWalletTx(CWallet* pwallet, vector<uint256>& vTxHash, vec
725
722
return result;
726
723
}
727
724
728
- DBErrors CWalletDB::ZapSelectTx (CWallet* pwallet, vector<uint256>& vTxHashIn, vector<uint256>& vTxHashOut)
725
+ DBErrors CWalletDB::ZapSelectTx (vector<uint256>& vTxHashIn, vector<uint256>& vTxHashOut)
729
726
{
730
727
// build list of wallet TXs and hashes
731
728
vector<uint256> vTxHash;
732
729
vector<CWalletTx> vWtx;
733
- DBErrors err = FindWalletTx (pwallet, vTxHash, vWtx);
730
+ DBErrors err = FindWalletTx (vTxHash, vWtx);
734
731
if (err != DB_LOAD_OK) {
735
732
return err;
736
733
}
@@ -749,7 +746,6 @@ DBErrors CWalletDB::ZapSelectTx(CWallet* pwallet, vector<uint256>& vTxHashIn, ve
749
746
break ;
750
747
}
751
748
else if ((*it) == hash) {
752
- pwallet->mapWallet .erase (hash);
753
749
if (!EraseTx (hash)) {
754
750
LogPrint (" db" , " Transaction was found for deletion but returned database error: %s\n " , hash.GetHex ());
755
751
delerror = true ;
@@ -764,11 +760,11 @@ DBErrors CWalletDB::ZapSelectTx(CWallet* pwallet, vector<uint256>& vTxHashIn, ve
764
760
return DB_LOAD_OK;
765
761
}
766
762
767
- DBErrors CWalletDB::ZapWalletTx (CWallet* pwallet, vector<CWalletTx>& vWtx)
763
+ DBErrors CWalletDB::ZapWalletTx (vector<CWalletTx>& vWtx)
768
764
{
769
765
// build list of wallet TXs
770
766
vector<uint256> vTxHash;
771
- DBErrors err = FindWalletTx (pwallet, vTxHash, vWtx);
767
+ DBErrors err = FindWalletTx (vTxHash, vWtx);
772
768
if (err != DB_LOAD_OK)
773
769
return err;
774
770
0 commit comments