fixed lint errors

This commit is contained in:
Mikelle
2021-03-29 14:01:01 +03:00
parent 7901705dfd
commit b565c9da1a
2 changed files with 2 additions and 1 deletions

View File

@@ -128,6 +128,7 @@ func (l2db *L2DB) GetTxAPI(txID common.TxID) (*PoolTxAPI, error) {
))
}
// GetPoolTxs return Txs from the pool
func (l2db *L2DB) GetPoolTxs(idx *common.Idx, state *common.PoolL2TxState) ([]*PoolTxAPI, error) {
cancel, err := l2db.apiConnCon.Acquire()
defer cancel()
@@ -154,7 +155,6 @@ func (l2db *L2DB) GetPoolTxs(idx *common.Idx, state *common.PoolL2TxState) ([]*P
queryStr += "OR tx_pool.to_idx = ?) "
args = append(args, idx)
args = append(args, idx)
nextIsAnd = true
}
queryStr += "AND NOT external_delete;"
query := l2db.dbRead.Rebind(queryStr)

View File

@@ -317,6 +317,7 @@ func TestL2DB_GetPoolTxs(t *testing.T) {
log.Error("Error prepare historyDB", err)
}
poolL2Txs, err := generatePoolL2Txs()
require.NoError(t, err)
state := common.PoolL2TxState("pend")
idx := common.Idx(256)
var pendingTxs []*common.PoolL2Tx