Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Feature/get pool txs (#689)
Browse files Browse the repository at this point in the history
* implemented get pool txs endpoint

* implemented get pool txs endpoint

* 

* fixed imports errors

* updated swagger doc according to new getPoolTxs and getHistoryTxs changes

* added pagination to getPoolTxs method

* fixed l2db_test.go

* fixed goimport in l

* merged with develop

* fixed pr remarks

* fixed l2db_test.go

* added comment to the GetPoolTxsAPIRequest struct

* fixed txshistory_test.go

* added unique constraint, returned go.mod,

* fixed wrong comments

* fixed errors after renaming of GetPoolTxs -> GetPoolTxsAPI

* from and to filters now works together

* moved db constants to util, improved tests
  • Loading branch information
Mikelle authored Apr 21, 2021
1 parent aa18a65 commit f4f77aa
Show file tree
Hide file tree
Showing 25 changed files with 1,027 additions and 109 deletions.
13 changes: 7 additions & 6 deletions api/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/hermeznetwork/hermez-node/api/apitypes"
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/mitchellh/copystructure"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -76,14 +77,14 @@ func TestGetAccounts(t *testing.T) {

// Filter by BJJ
path := fmt.Sprintf("%s?BJJ=%s&limit=%d", endpoint, tc.accounts[0].PublicKey, limit)
err := doGoodReqPaginated(path, historydb.OrderAsc, &testAccountsResponse{}, appendIter)
err := doGoodReqPaginated(path, db.OrderAsc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Greater(t, len(fetchedAccounts), 0)
assert.LessOrEqual(t, len(fetchedAccounts), len(tc.accounts))
fetchedAccounts = []testAccount{}
// Filter by ethAddr
path = fmt.Sprintf("%s?hezEthereumAddress=%s&limit=%d", endpoint, tc.accounts[3].EthAddr, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testAccountsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Greater(t, len(fetchedAccounts), 0)
assert.LessOrEqual(t, len(fetchedAccounts), len(tc.accounts))
Expand All @@ -95,21 +96,21 @@ func TestGetAccounts(t *testing.T) {
fetchedAccounts = []testAccount{}
// Filter by token IDs
path = fmt.Sprintf("%s?tokenIds=%s&limit=%d", endpoint, stringIds, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testAccountsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Greater(t, len(fetchedAccounts), 0)
assert.LessOrEqual(t, len(fetchedAccounts), len(tc.accounts))
fetchedAccounts = []testAccount{}
// Token Ids + bjj
path = fmt.Sprintf("%s?tokenIds=%s&BJJ=%s&limit=%d", endpoint, stringIds, tc.accounts[10].PublicKey, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testAccountsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Greater(t, len(fetchedAccounts), 0)
assert.LessOrEqual(t, len(fetchedAccounts), len(tc.accounts))
fetchedAccounts = []testAccount{}
// No filters (checks response content)
path = fmt.Sprintf("%s?limit=%d", endpoint, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testAccountsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Equal(t, len(tc.accounts), len(fetchedAccounts))
for i := 0; i < len(fetchedAccounts); i++ {
Expand All @@ -132,7 +133,7 @@ func TestGetAccounts(t *testing.T) {
reversedAccounts = append(reversedAccounts, tmp.(testAccount))
}
}
err = doGoodReqPaginated(path, historydb.OrderDesc, &testAccountsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testAccountsResponse{}, appendIter)
require.NoError(t, err)
assert.Equal(t, len(reversedAccounts), len(fetchedAccounts))
for i := 0; i < len(fetchedAccounts); i++ {
Expand Down
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ func NewAPI(
// Transaction
v1.POST("/transactions-pool", a.postPoolTx)
v1.GET("/transactions-pool/:id", a.getPoolTx)
v1.GET("/transactions-pool", a.getPoolTxs)
}

// Add explorer endpoints
Expand Down
2 changes: 1 addition & 1 deletion api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ func doGoodReqPaginated(
if remaining == 0 {
break
}
if order == historydb.OrderDesc {
if order == db.OrderDesc {
next = lastID - 1
} else {
next = lastID + 1
Expand Down
3 changes: 2 additions & 1 deletion api/batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

"github.com/gin-gonic/gin"
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/hermeznetwork/tracerr"
)
Expand Down Expand Up @@ -118,7 +119,7 @@ func (a *API) getFullBatch(c *gin.Context) {
txs, _, err := a.h.GetTxsAPI(historydb.GetTxsAPIRequest{
BatchNum: batchNum,
Limit: &maxTxsPerBatch,
Order: historydb.OrderAsc,
Order: db.OrderAsc,
})
if err != nil && tracerr.Unwrap(err) != sql.ErrNoRows {
retSQLErr(err, c)
Expand Down
18 changes: 9 additions & 9 deletions api/batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
ethCommon "github.com/ethereum/go-ethereum/common"
"github.com/hermeznetwork/hermez-node/api/apitypes"
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/hermeznetwork/hermez-node/db"
"github.com/mitchellh/copystructure"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestGetBatches(t *testing.T) {
// Get all (no filters)
limit := 3
path := fmt.Sprintf("%s?limit=%d", endpoint, limit)
err := doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err := doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
assertBatches(t, tc.batches, fetchedBatches)

Expand All @@ -142,7 +142,7 @@ func TestGetBatches(t *testing.T) {
limit = 2
minBatchNum := tc.batches[len(tc.batches)/2].BatchNum
path = fmt.Sprintf("%s?minBatchNum=%d&limit=%d", endpoint, minBatchNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
minBatchNumBatches := []testBatch{}
for i := 0; i < len(tc.batches); i++ {
Expand All @@ -157,7 +157,7 @@ func TestGetBatches(t *testing.T) {
limit = 1
maxBatchNum := tc.batches[len(tc.batches)/2].BatchNum
path = fmt.Sprintf("%s?maxBatchNum=%d&limit=%d", endpoint, maxBatchNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
maxBatchNumBatches := []testBatch{}
for i := 0; i < len(tc.batches); i++ {
Expand All @@ -172,7 +172,7 @@ func TestGetBatches(t *testing.T) {
limit = 5
slotNum := tc.batches[len(tc.batches)/2].SlotNum
path = fmt.Sprintf("%s?slotNum=%d&limit=%d", endpoint, slotNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
slotNumBatches := []testBatch{}
for i := 0; i < len(tc.batches); i++ {
Expand All @@ -187,7 +187,7 @@ func TestGetBatches(t *testing.T) {
limit = 10
forgerAddr := tc.batches[len(tc.batches)/2].ForgerAddr
path = fmt.Sprintf("%s?forgerAddr=%s&limit=%d", endpoint, forgerAddr.String(), limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
forgerAddrBatches := []testBatch{}
for i := 0; i < len(tc.batches); i++ {
Expand All @@ -201,7 +201,7 @@ func TestGetBatches(t *testing.T) {
fetchedBatches = []testBatch{}
limit = 6
path = fmt.Sprintf("%s?limit=%d", endpoint, limit)
err = doGoodReqPaginated(path, historydb.OrderDesc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
flippedBatches := []testBatch{}
for i := len(tc.batches) - 1; i >= 0; i-- {
Expand All @@ -215,7 +215,7 @@ func TestGetBatches(t *testing.T) {
maxBatchNum = tc.batches[len(tc.batches)-len(tc.batches)/4].BatchNum
minBatchNum = tc.batches[len(tc.batches)/4].BatchNum
path = fmt.Sprintf("%s?minBatchNum=%d&maxBatchNum=%d&limit=%d", endpoint, minBatchNum, maxBatchNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
minMaxBatchNumBatches := []testBatch{}
for i := 0; i < len(tc.batches); i++ {
Expand All @@ -228,7 +228,7 @@ func TestGetBatches(t *testing.T) {
// Empty array
fetchedBatches = []testBatch{}
path = fmt.Sprintf("%s?slotNum=%d&minBatchNum=%d", endpoint, 1, 25)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBatchesResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBatchesResponse{}, appendIter)
require.NoError(t, err)
assertBatches(t, []testBatch{}, fetchedBatches)

Expand Down
11 changes: 6 additions & 5 deletions api/bids_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

ethCommon "github.com/ethereum/go-ethereum/common"
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/mitchellh/copystructure"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -80,7 +81,7 @@ func TestGetBids(t *testing.T) {
fetchedBids = []testBid{}
bidderAddress := tc.bids[3].Bidder
path := fmt.Sprintf("%s?bidderAddr=%s&limit=%d", endpoint, bidderAddress.String(), limit)
err := doGoodReqPaginated(path, historydb.OrderAsc, &testBidsResponse{}, appendIter)
err := doGoodReqPaginated(path, db.OrderAsc, &testBidsResponse{}, appendIter)
assert.NoError(t, err)
bidderAddrBids := []testBid{}
for i := 0; i < len(tc.bids); i++ {
Expand All @@ -94,7 +95,7 @@ func TestGetBids(t *testing.T) {
fetchedBids = []testBid{}
slotNum := tc.bids[3].SlotNum
path = fmt.Sprintf("%s?slotNum=%d&limit=%d", endpoint, slotNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBidsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBidsResponse{}, appendIter)
assert.NoError(t, err)
slotNumBids := []testBid{}
for i := 0; i < len(tc.bids); i++ {
Expand All @@ -107,7 +108,7 @@ func TestGetBids(t *testing.T) {
// slotNum, in reverse order
fetchedBids = []testBid{}
path = fmt.Sprintf("%s?slotNum=%d&limit=%d", endpoint, slotNum, limit)
err = doGoodReqPaginated(path, historydb.OrderDesc, &testBidsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testBidsResponse{}, appendIter)
assert.NoError(t, err)
flippedBids := []testBid{}
for i := len(slotNumBids) - 1; i >= 0; i-- {
Expand All @@ -120,7 +121,7 @@ func TestGetBids(t *testing.T) {
bidderAddress = tc.bids[1].Bidder
slotNum = tc.bids[1].SlotNum
path = fmt.Sprintf("%s?bidderAddr=%s&slotNum=%d&limit=%d", endpoint, bidderAddress.String(), slotNum, limit)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBidsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBidsResponse{}, appendIter)
assert.NoError(t, err)
slotNumBidderAddrBids := []testBid{}
for i := 0; i < len(tc.bids); i++ {
Expand All @@ -133,7 +134,7 @@ func TestGetBids(t *testing.T) {
// Empty array
fetchedBids = []testBid{}
path = fmt.Sprintf("%s?slotNum=%d&bidderAddr=%s", endpoint, 5, tc.bids[1].Bidder.String())
err = doGoodReqPaginated(path, historydb.OrderAsc, &testBidsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testBidsResponse{}, appendIter)
assert.NoError(t, err)
assertBids(t, []testBid{}, fetchedBids)

Expand Down
11 changes: 6 additions & 5 deletions api/coordinator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/mitchellh/copystructure"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -72,13 +73,13 @@ func TestGetCoordinators(t *testing.T) {
// All
limit := 5
path := fmt.Sprintf("%s?limit=%d", endpoint, limit)
err := doGoodReqPaginated(path, historydb.OrderAsc, &testCoordinatorsResponse{}, appendIter)
err := doGoodReqPaginated(path, db.OrderAsc, &testCoordinatorsResponse{}, appendIter)
assert.NoError(t, err)
assertCoordinators(t, tc.coordinators, fetchedCoordinators)

// All in reverse order
fetchedCoordinators = []historydb.CoordinatorAPI{}
err = doGoodReqPaginated(path, historydb.OrderDesc, &testCoordinatorsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testCoordinatorsResponse{}, appendIter)
assert.NoError(t, err)
reversedCoordinators := []historydb.CoordinatorAPI{}
for i := 0; i < len(tc.coordinators); i++ {
Expand All @@ -90,15 +91,15 @@ func TestGetCoordinators(t *testing.T) {
fetchedCoordinators = []historydb.CoordinatorAPI{}
err = doGoodReqPaginated(
fmt.Sprintf(path+"&bidderAddr=%s", filteredCoord.Bidder.String()),
historydb.OrderAsc, &testCoordinatorsResponse{}, appendIter,
db.OrderAsc, &testCoordinatorsResponse{}, appendIter,
)
assert.NoError(t, err)
assertCoordinators(t, []historydb.CoordinatorAPI{filteredCoord}, fetchedCoordinators)
// By forger
fetchedCoordinators = []historydb.CoordinatorAPI{}
err = doGoodReqPaginated(
fmt.Sprintf(path+"&forgerAddr=%s", filteredCoord.Forger.String()),
historydb.OrderAsc, &testCoordinatorsResponse{}, appendIter,
db.OrderAsc, &testCoordinatorsResponse{}, appendIter,
)
assert.NoError(t, err)
assertCoordinators(t, []historydb.CoordinatorAPI{filteredCoord}, fetchedCoordinators)
Expand All @@ -107,7 +108,7 @@ func TestGetCoordinators(t *testing.T) {
// Empty array
fetchedCoordinators = []historydb.CoordinatorAPI{}
path = fmt.Sprintf("%s?bidderAddr=0xaa942cfcd25ad4d90a62358b0dd84f33b398262a", endpoint)
err = doGoodReqPaginated(path, historydb.OrderDesc, &testCoordinatorsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testCoordinatorsResponse{}, appendIter)
assert.NoError(t, err)
assertCoordinators(t, []historydb.CoordinatorAPI{}, fetchedCoordinators)

Expand Down
21 changes: 11 additions & 10 deletions api/exits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/hermeznetwork/hermez-node/api/apitypes"
"github.com/hermeznetwork/hermez-node/common"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/mitchellh/copystructure"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -110,7 +111,7 @@ func TestGetExits(t *testing.T) {
// Get all (no filters)
limit := 8
path := fmt.Sprintf("%s?limit=%d", endpoint, limit)
err := doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err := doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
assertExitAPIs(t, tc.exits, fetchedExits)

Expand All @@ -136,7 +137,7 @@ func TestGetExits(t *testing.T) {
"%s?hezEthereumAddress=%s&limit=%d",
endpoint, account.EthAddr, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
var accountExits []testExit
for i := range tc.exits {
Expand All @@ -156,7 +157,7 @@ func TestGetExits(t *testing.T) {
"%s?BJJ=%s&limit=%d",
endpoint, account.PublicKey, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
assertExitAPIs(t, accountExits, fetchedExits)
// Get by tokenID
Expand All @@ -167,7 +168,7 @@ func TestGetExits(t *testing.T) {
"%s?tokenId=%d&limit=%d",
endpoint, tokenID, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
tokenIDExits := []testExit{}
for i := 0; i < len(tc.exits); i++ {
Expand All @@ -184,7 +185,7 @@ func TestGetExits(t *testing.T) {
"%s?accountIndex=%s&limit=%d",
endpoint, idx, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
idxExits := []testExit{}
for i := 0; i < len(tc.exits); i++ {
Expand All @@ -201,7 +202,7 @@ func TestGetExits(t *testing.T) {
"%s?batchNum=%d&limit=%d",
endpoint, batchNum, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
batchNumExits := []testExit{}
for i := 0; i < len(tc.exits); i++ {
Expand All @@ -217,7 +218,7 @@ func TestGetExits(t *testing.T) {
"%s?&onlyPendingWithdraws=%t&limit=%d",
endpoint, true, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
pendingExits := []testExit{}
for i := 0; i < len(tc.exits); i++ {
Expand All @@ -233,7 +234,7 @@ func TestGetExits(t *testing.T) {
"%s?batchNum=%d&tokeId=%d&limit=%d",
endpoint, batchNum, tokenID, limit,
)
err = doGoodReqPaginated(path, historydb.OrderAsc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderAsc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
mixedExits := []testExit{}
flipedExits := []testExit{}
Expand All @@ -248,13 +249,13 @@ func TestGetExits(t *testing.T) {
fetchedExits = []testExit{}
limit = 5
path = fmt.Sprintf("%s?limit=%d", endpoint, limit)
err = doGoodReqPaginated(path, historydb.OrderDesc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
assertExitAPIs(t, flipedExits, fetchedExits)
// Empty array
fetchedExits = []testExit{}
path = fmt.Sprintf("%s?batchNum=999999", endpoint)
err = doGoodReqPaginated(path, historydb.OrderDesc, &testExitsResponse{}, appendIter)
err = doGoodReqPaginated(path, db.OrderDesc, &testExitsResponse{}, appendIter)
assert.NoError(t, err)
assertExitAPIs(t, []testExit{}, fetchedExits)
// 400
Expand Down
4 changes: 2 additions & 2 deletions api/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/hermeznetwork/hermez-node/db/historydb"
"github.com/hermeznetwork/hermez-node/db"
"github.com/hermeznetwork/hermez-node/log"
"github.com/hermeznetwork/hermez-node/metric"
"github.com/hermeznetwork/tracerr"
Expand All @@ -19,7 +19,7 @@ const (
maxLimit uint = 2049

// dfltOrder indicates how paginated endpoints are ordered if not specified
dfltOrder = historydb.OrderAsc
dfltOrder = db.OrderAsc

// dfltLimit indicates the limit of returned items in paginated responses if the query param limit is not provided
dfltLimit uint = 20
Expand Down
Loading

0 comments on commit f4f77aa

Please sign in to comment.