mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 12:25:54 +02:00
Merge bitcoin/bitcoin#24083: Revert "Add to spends only transcations from me"
3ee6d0788etest: add more wallet conflicts assertions (S3RK)3b98bf9c43Revert "Add to spends only transcations from me" (S3RK) Pull request description: This reverts commitd04566415efrom #22929. This commit was based on invalid assumption that `mapTxSpends` should contain only outgoing txs and broke wallet conflicts feature. ACKs for top commit: achow101: ACK3ee6d0788eTree-SHA512: bf5a77ced6bac57d5eb85771d9189c53e1edc295d179ed5a1bdce18e365794a9101b4cecf35387b27f67260db3b47f7214e7876e490494529b748cceeb95632d
This commit is contained in:
@@ -952,9 +952,7 @@ CWalletTx* CWallet::AddToWallet(CTransactionRef tx, const TxState& state, const
|
||||
wtx.nOrderPos = IncOrderPosNext(&batch);
|
||||
wtx.m_it_wtxOrdered = wtxOrdered.insert(std::make_pair(wtx.nOrderPos, &wtx));
|
||||
wtx.nTimeSmart = ComputeTimeSmart(wtx, rescanning_old_block);
|
||||
if (IsFromMe(*tx.get())) {
|
||||
AddToSpends(hash);
|
||||
}
|
||||
AddToSpends(hash, &batch);
|
||||
}
|
||||
|
||||
if (!fInsertedNew)
|
||||
|
||||
Reference in New Issue
Block a user