Add semaphore for API queries to SQL

This commit is contained in:
Arnau B
2021-02-08 18:50:32 +01:00
committed by Eduard S
parent 56d05ce57a
commit ac1fd9acf7
27 changed files with 1339 additions and 981 deletions

View File

@@ -108,7 +108,7 @@ func (a *API) getFullBatch(c *gin.Context) {
}
// Fetch txs forged in the batch from historyDB
maxTxsPerBatch := uint(2048) //nolint:gomnd
txs, _, err := a.h.GetHistoryTxs(
txs, _, err := a.h.GetTxsAPI(
nil, nil, nil, nil, batchNum, nil, nil, &maxTxsPerBatch, historydb.OrderAsc,
)
if err != nil && tracerr.Unwrap(err) != sql.ErrNoRows {