mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-22 17:31:34 +00:00
rpc: use /iavl repo in test (#713)
This commit is contained in:
@ -7,7 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/tendermint/merkleeyes/iavl" //TODO use tendermint/iavl ?
|
||||
"github.com/tendermint/iavl"
|
||||
"github.com/tendermint/tendermint/rpc/client"
|
||||
rpctest "github.com/tendermint/tendermint/rpc/test"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
@ -174,13 +174,13 @@ func TestAppCalls(t *testing.T) {
|
||||
// and we got a proof that works!
|
||||
pres, err := c.ABCIQuery("/key", k, true)
|
||||
if assert.Nil(err) && assert.True(pres.Code.IsOK()) {
|
||||
proof, err := iavl.ReadProof(pres.Proof)
|
||||
proof, err := iavl.ReadKeyExistsProof(pres.Proof)
|
||||
if assert.Nil(err) {
|
||||
key := pres.Key
|
||||
value := pres.Value
|
||||
assert.EqualValues(appHash, proof.RootHash)
|
||||
valid := proof.Verify(key, value, appHash)
|
||||
assert.True(valid)
|
||||
assert.Nil(valid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user