|
|
@ -1608,7 +1608,7 @@ bool CWallet::UpdatedNoteData(const CWalletTx& wtxIn, CWalletTx& wtx) |
|
|
|
* If fUpdate is true, existing transactions will be updated. |
|
|
|
*/ |
|
|
|
|
|
|
|
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, bool fUpdate) |
|
|
|
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pblock, const int nHeight, bool fUpdate) |
|
|
|
{ |
|
|
|
if(fDebug) |
|
|
|
fprintf(stderr,"%s: tx=%s\n", __func__, tx.GetHash().ToString().c_str() ); |
|
|
@ -1690,12 +1690,12 @@ bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlock* pbl |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
void CWallet::SyncTransaction(const CTransaction& tx, const CBlock* pblock) |
|
|
|
void CWallet::SyncTransaction(const CTransaction& tx, const CBlock* pblock, const int nHeight); |
|
|
|
{ |
|
|
|
LOCK(cs_wallet); |
|
|
|
if(fDebug) |
|
|
|
fprintf(stderr,"%s: tx=%s\n", __func__, tx.GetHash().ToString().c_str() ); |
|
|
|
if (!AddToWalletIfInvolvingMe(tx, pblock, true)) |
|
|
|
if (!AddToWalletIfInvolvingMe(tx, pblock, nHeight, true)) |
|
|
|
return; // Not one of ours
|
|
|
|
|
|
|
|
MarkAffectedTransactionsDirty(tx); |
|
|
@ -2878,7 +2878,7 @@ int CWallet::ScanForWalletTransactions(CBlockIndex* pindexStart, bool fUpdate) |
|
|
|
|
|
|
|
BOOST_FOREACH(CTransaction& tx, block.vtx) |
|
|
|
{ |
|
|
|
if (AddToWalletIfInvolvingMe(tx, &block, fUpdate)) { |
|
|
|
if (AddToWalletIfInvolvingMe(tx, &block, pindex->nHeight, fUpdate)) { |
|
|
|
involvesMe = true; |
|
|
|
ret++; |
|
|
|
} |
|
|
|