Browse Source

fixed lint errors

feature/getPoolTxs
Mikelle 3 years ago
parent
commit
b565c9da1a
2 changed files with 2 additions and 1 deletions
  1. +1
    -1
      db/l2db/apiqueries.go
  2. +1
    -0
      db/l2db/l2db_test.go

+ 1
- 1
db/l2db/apiqueries.go

@ -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)

+ 1
- 0
db/l2db/l2db_test.go

@ -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

Loading…
Cancel
Save