Skip to content

Commit

Permalink
refine: improve the query of GetTxsTotalCount (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcarl authored Oct 28, 2022
1 parent 0d8889f commit 97b4c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dao/tx/tx_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (m *defaultTxPoolModel) GetTxsTotalCount(options ...GetTxOptionFunc) (count
dbTx = dbTx.Where("id > (?)", subTx)
}

dbTx = dbTx.Where("deleted_at is NULL").Count(&count)
dbTx = dbTx.Count(&count)
if dbTx.Error != nil {
return 0, types.DbErrSqlOperation
} else if dbTx.RowsAffected == 0 {
Expand Down

0 comments on commit 97b4c10

Please sign in to comment.