Skip to content

Commit b2fdbbf

Browse files
committed
[Wallet] Write new transactions to wtxOrdered properly
This addresses an issue where new incoming transactions aren't recorded, and subsequently, not returned with `listtransactions` in the same session.
1 parent 084c10d commit b2fdbbf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/wallet.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
659659
if (!wtx.nTimeReceived)
660660
wtx.nTimeReceived = GetAdjustedTime();
661661
wtx.nOrderPos = IncOrderPosNext();
662+
wtxOrdered.insert(make_pair(wtx.nOrderPos, TxPair(&wtx, (CAccountingEntry*)0)));
662663
wtx.nTimeSmart = ComputeTimeSmart(wtx);
663664
AddToSpends(hash);
664665
}

0 commit comments

Comments
 (0)