@@ -87,6 +87,7 @@ TXHistoryDialog::TXHistoryDialog(QWidget *parent) :
8787 ui->txHistoryTable ->horizontalHeader ()->setSectionResizeMode (6 , QHeaderView::Interactive);
8888 #endif
8989 ui->txHistoryTable ->setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
90+ ui->txHistoryTable ->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOn);
9091 ui->txHistoryTable ->verticalHeader ()->setVisible (false );
9192 ui->txHistoryTable ->setSelectionBehavior (QAbstractItemView::SelectRows);
9293 ui->txHistoryTable ->setEditTriggers (QAbstractItemView::NoEditTriggers);
@@ -210,11 +211,14 @@ int TXHistoryDialog::PopulateHistoryMap()
210211 std::vector<std::string> vecReceipts;
211212 boost::split (vecReceipts, mySTOReceipts, boost::is_any_of (" ," ), boost::token_compress_on);
212213 int64_t lastTXBlock = 999999 ; // set artificially high initially until first wallet tx is processed
213- // iterate through wallet entries backwards
214+ // iterate through wallet entries backwards, limiting to most recent n (default 500) transactions (override with --omniuiwalletscope=n)
215+ int walletTxCount = 0 , walletTxMax = GetArg (" -omniuiwalletscope" , 500 );
214216 std::list<CAccountingEntry> acentries;
215217 CWallet::TxItems txOrdered = pwalletMain->OrderedTxItems (acentries, " *" );
216218 for (CWallet::TxItems::reverse_iterator it = txOrdered.rbegin (); it != txOrdered.rend (); ++it) {
217219 CWalletTx *const pwtx = (*it).second .first ;
220+ if (walletTxCount >= walletTxMax) break ;
221+ ++walletTxCount;
218222 if (pwtx != 0 ) {
219223 uint256 hash = pwtx->GetHash ();
220224 // check txlistdb, if not there it's not a confirmed Omni transaction so move to next transaction
0 commit comments