mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Better document usage of SyncTransaction
This commit is contained in:
@@ -1003,9 +1003,17 @@ bool CWallet::LoadToWallet(const CWalletTx& wtxIn)
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a transaction to the wallet, or update it.
|
||||
* pblock is optional, but should be provided if the transaction is known to be in a block.
|
||||
* Add a transaction to the wallet, or update it. pIndex and posInBlock should
|
||||
* be set when the transaction was known to be included in a block. When
|
||||
* posInBlock = SYNC_TRANSACTION_NOT_IN_BLOCK (-1) , then wallet state is not
|
||||
* updated in AddToWallet, but notifications happen and cached balances are
|
||||
* marked dirty.
|
||||
* If fUpdate is true, existing transactions will be updated.
|
||||
* TODO: One exception to this is that the abandoned state is cleared under the
|
||||
* assumption that any further notification of a transaction that was considered
|
||||
* abandoned is an indication that it is not safe to be considered abandoned.
|
||||
* Abandoned state should probably be more carefuly tracked via different
|
||||
* posInBlock signals or by checking mempool presence when necessary.
|
||||
*/
|
||||
bool CWallet::AddToWalletIfInvolvingMe(const CTransaction& tx, const CBlockIndex* pIndex, int posInBlock, bool fUpdate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user