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

6
glide.lock generated
View File

@ -118,10 +118,8 @@ imports:
subpackages: subpackages:
- data - data
- data/base58 - data/base58
- name: github.com/tendermint/merkleeyes - name: github.com/tendermint/iavl
version: 2a93256d2c6fbcc3b55673c0d2b96a7e32c6238b version: 9233811d241ac8d4441a7223a4e79b83931dfae0
subpackages:
- iavl
- name: github.com/tendermint/tmlibs - name: github.com/tendermint/tmlibs
version: 096dcb90e60aa00b748b3fe49a4b95e48ebf1e13 version: 096dcb90e60aa00b748b3fe49a4b95e48ebf1e13
subpackages: subpackages:

View File

@ -25,8 +25,8 @@ import:
version: ~0.6.2 version: ~0.6.2
subpackages: subpackages:
- data - data
- package: github.com/tendermint/merkleeyes - package: github.com/tendermint/iavl
version: master version: develop
subpackages: subpackages:
- iavl - iavl
- package: github.com/tendermint/tmlibs - package: github.com/tendermint/tmlibs

View File

@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/tendermint/merkleeyes/iavl" //TODO use tendermint/iavl ? "github.com/tendermint/iavl"
"github.com/tendermint/tendermint/rpc/client" "github.com/tendermint/tendermint/rpc/client"
rpctest "github.com/tendermint/tendermint/rpc/test" rpctest "github.com/tendermint/tendermint/rpc/test"
"github.com/tendermint/tendermint/types" "github.com/tendermint/tendermint/types"
@ -174,13 +174,13 @@ func TestAppCalls(t *testing.T) {
// and we got a proof that works! // and we got a proof that works!
pres, err := c.ABCIQuery("/key", k, true) pres, err := c.ABCIQuery("/key", k, true)
if assert.Nil(err) && assert.True(pres.Code.IsOK()) { 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) { if assert.Nil(err) {
key := pres.Key key := pres.Key
value := pres.Value value := pres.Value
assert.EqualValues(appHash, proof.RootHash) assert.EqualValues(appHash, proof.RootHash)
valid := proof.Verify(key, value, appHash) valid := proof.Verify(key, value, appHash)
assert.True(valid) assert.Nil(valid)
} }
} }
} }