Browse Source

Merge pull request #374 from VerusCoin/dev

Dev
pull/376/head v0.9.0-3
Asher Dawes 3 years ago
committed by GitHub
parent
commit
a2c4774033
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/wallet/rpcdump.cpp
  2. 7
      src/wallet/wallet.cpp

2
src/wallet/rpcdump.cpp

@ -431,7 +431,7 @@ UniValue importwallet_impl(const UniValue& params, bool fHelp, bool fImportZKeys
pwalletMain->nTimeFirstKey = nTimeBegin;
LogPrintf("Rescanning last %i blocks\n", chainActive.Height() - pindex->GetHeight() + 1);
pwalletMain->ScanForWalletTransactions(pindex);
pwalletMain->ScanForWalletTransactions(pindex, true);
pwalletMain->MarkDirty();
if (!fGood)

7
src/wallet/wallet.cpp

@ -2421,6 +2421,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
uint256 txHash = tx.GetHash();
bool fExisted = mapWallet.count(txHash) != 0;
bool isNewID = false;
if (fExisted && !fUpdate) return false;
auto sproutNoteData = FindMySproutNotes(tx);
auto saplingNoteDataAndAddressesToAdd = FindMySaplingNotes(tx);
@ -2631,6 +2632,10 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
(canSignCanSpend.first ? idHistory.first.CAN_SIGN : 0) |
(canSignCanSpend.second ? idHistory.first.CAN_SPEND : 0));
AddUpdateIdentity(idMapKey, identity);
if (canSignCanSpend.first)
{
isNewID = true;
}
}
}
else
@ -3079,7 +3084,7 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl
// for IsMine, the default height is max, not 0
nHeight = nHeight == 0 ? INT_MAX : nHeight;
if (fExisted || IsMine(tx, nHeight) || IsFromMe(tx, nHeight) || sproutNoteData.size() > 0 || saplingNoteData.size() > 0)
if (fExisted || isNewID || IsMine(tx, nHeight) || IsFromMe(tx, nHeight) || sproutNoteData.size() > 0 || saplingNoteData.size() > 0)
{
CWalletTx wtx(this, tx);

Loading…
Cancel
Save