Skip to content

Commit 240ea29

Browse files
author
BitcoinTsunami
committed
doc: update doxygen documention of ComputeTimeSmart() and AddToWalletIfInvolvingMe() regarding rescanning_old_block parameter
1 parent d6eb39a commit 240ea29

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/wallet/wallet.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2384,6 +2384,8 @@ void CWallet::GetKeyBirthTimes(std::map<CKeyID, int64_t>& mapKeyBirth) const {
23842384
* - If sending a transaction, assign its timestamp to the current time.
23852385
* - If receiving a transaction outside a block, assign its timestamp to the
23862386
* current time.
2387+
* - If receiving a transaction during a rescanning process, assign all its
2388+
* (not already known) transactions' timestamps to the block time.
23872389
* - If receiving a block with a future timestamp, assign all its (not already
23882390
* known) transactions' timestamps to the current time.
23892391
* - If receiving a block with a past timestamp, before the most recent known

src/wallet/wallet.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
271271
* abandoned is an indication that it is not safe to be considered abandoned.
272272
* Abandoned state should probably be more carefully tracked via different
273273
* posInBlock signals or by checking mempool presence when necessary.
274+
*
275+
* Should be called with rescanning_old_block set to true, if the transaction is
276+
* not discovered in real time, but during a rescan of old blocks.
274277
*/
275278
bool AddToWalletIfInvolvingMe(const CTransactionRef& tx, CWalletTx::Confirmation confirm, bool fUpdate, bool rescanning_old_block) EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
276279

0 commit comments

Comments
 (0)