rpc: use /iavl repo in test (#713)

This commit is contained in:
Zach Ramsay
2017-10-11 10:35:22 -04:00
parent 27245ce6f6
commit e2e50bc0fc
3 changed files with 7 additions and 9 deletions

View File

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