mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 05:41:21 +00:00
Hotfix/validating query result length (#3053)
* Validating that there are txs in the query results before loop throught the array * Created tests to validate the error has been fixed * Added comments * Fixing misspeling * check if the variable "skipCount" is bigger than zero. If it is not, we set it to 0. If it, we do not do anything. * using function that validates the skipCount variable * undo Gopkg.lock changes
This commit is contained in:
committed by
Ethan Buchman
parent
a6011c007d
commit
be00cd1add
@ -428,5 +428,10 @@ func TestTxSearch(t *testing.T) {
|
||||
if len(result.Txs) == 0 {
|
||||
t.Fatal("expected a lot of transactions")
|
||||
}
|
||||
|
||||
// query a non existing tx with page 1 and txsPerPage 1
|
||||
result, err = c.TxSearch("app.creator='Cosmoshi Neetowoko'", true, 1, 1)
|
||||
require.Nil(t, err, "%+v", err)
|
||||
require.Len(t, result.Txs, 0)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user