include the chaintip blockindex in the SyncTransaction signal, add signal UpdateTip()

This commit is contained in:
Jonas Schnelli
2015-07-27 15:33:03 +02:00
committed by lateminer
parent 8f5935a1d8
commit 6d90c71b64
7 changed files with 16 additions and 15 deletions

View File

@@ -1559,7 +1559,7 @@ bool AcceptToMemoryPoolWorker(CTxMemPool& pool, CValidationState& state, const C
}
}
SyncWithWallets(tx, NULL, fRespend);
SyncWithWallets(tx, NULL, NULL, fRespend);
return !fRespend;
}
@@ -2852,7 +2852,7 @@ bool static DisconnectTip(CValidationState& state, const Consensus::Params& cons
// Let wallets know transactions went from 1-confirmed to
// 0-confirmed or conflicted:
BOOST_FOREACH(const CTransaction &tx, block.vtx) {
SyncWithWallets(tx, NULL, false);
SyncWithWallets(tx, pindexDelete->pprev, NULL, false);
}
return true;
}
@@ -2911,11 +2911,11 @@ bool static ConnectTip(CValidationState& state, const CChainParams& chainparams,
// Tell wallet about transactions that went from mempool
// to conflicted:
BOOST_FOREACH(const CTransaction &tx, txConflicted) {
SyncWithWallets(tx, NULL, false);
SyncWithWallets(tx, pindexNew, NULL, false);
}
// ... and about transactions that got confirmed:
BOOST_FOREACH(const CTransaction &tx, pblock->vtx) {
SyncWithWallets(tx, pblock, false);
SyncWithWallets(tx, pindexNew, pblock, false);
}
int64_t nTime6 = GetTimeMicros(); nTimePostConnect += nTime6 - nTime5; nTimeTotal += nTime6 - nTime1;