Skip to content

Commit

Permalink
indexer: optimize performance of List methods
Browse files Browse the repository at this point in the history
* idx.TokenFeesList
* idx.TokenTransfersList
* idx.ProcessList
* idx.TransactionList (renamed from idx.SearchTransactions)
* idx.VoteList
* idx.AccountList
  • Loading branch information
altergui committed Sep 17, 2024
1 parent eb711f8 commit e9c571c
Show file tree
Hide file tree
Showing 21 changed files with 625 additions and 392 deletions.
2 changes: 1 addition & 1 deletion api/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ func (a *API) chainTxListByHeightAndPageHandler(_ *apirest.APIdata, ctx *httprou
//
// Errors returned are always of type APIerror.
func (a *API) transactionList(params *TransactionParams) (*TransactionsList, error) {
txs, total, err := a.indexer.SearchTransactions(
txs, total, err := a.indexer.TransactionList(
params.Limit,
params.Page*params.Limit,
params.Height,
Expand Down
63 changes: 28 additions & 35 deletions vochain/indexer/db/account.sql.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 30 additions & 10 deletions vochain/indexer/db/db.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions vochain/indexer/db/models.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e9c571c

Please sign in to comment.