Skip to content

Commit

Permalink
[Qt][Bug] Load the most recent instead of the first transactions
Browse files Browse the repository at this point in the history
Fixes a comparator bug when loading the initial `walletTxes` vector.
The design intention is to load the 20k most recent transactions, but it
 was loading the first 20k transactions in error, resulting in a
 potentially large gap in the UI's transaction history.
  • Loading branch information
Fuzzbawls committed Jan 14, 2020
1 parent 441d790 commit ec72107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qt/transactiontablemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class TransactionTablePriv
// txs are stored in order in the db, which is what should be happening)
sort(walletTxes.begin(), walletTxes.end(),
[](const CWalletTx & a, const CWalletTx & b) -> bool {
return a.GetComputedTxTime() < b.GetComputedTxTime();
return a.GetComputedTxTime() > b.GetComputedTxTime();
});

// Only latest ones.
Expand Down

0 comments on commit ec72107

Please sign in to comment.