From 7b595b3f87e28fa4538a0a4bae1c77d4026de2ad Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 20 Jun 2017 21:35:46 -0400 Subject: [PATCH] user ErrNoData from light-client --- cmd/basecli/commands/query.go | 7 ++++++- glide.lock | 6 +++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/cmd/basecli/commands/query.go b/cmd/basecli/commands/query.go index 5b616dc75f..34af3b8d60 100644 --- a/cmd/basecli/commands/query.go +++ b/cmd/basecli/commands/query.go @@ -1,9 +1,12 @@ package commands import ( + "fmt" + "github.com/spf13/cobra" wire "github.com/tendermint/go-wire" + lc "github.com/tendermint/light-client" proofcmd "github.com/tendermint/light-client/commands/proofs" "github.com/tendermint/light-client/proofs" @@ -25,7 +28,9 @@ func doAccountQuery(cmd *cobra.Command, args []string) error { acc := new(btypes.Account) proof, err := proofcmd.GetAndParseAppProof(key, &acc) - if err != nil { + if lc.IsNoDataErr(err) { + return fmt.Errorf("Account bytes are empty for address %X ", addr) + } else if err != nil { return err } diff --git a/glide.lock b/glide.lock index 38df58154d..8b96e92922 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ hash: 6eb1119dccf2ab4d0adb870a14cb4408047119be53c8ec4afeaa281bd1d2b457 -updated: 2017-06-15T17:51:21.867322849+02:00 +updated: 2017-06-20T20:55:16.122030554-04:00 imports: - name: github.com/bgentry/speakeasy version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd @@ -127,7 +127,7 @@ imports: - data - data/base58 - name: github.com/tendermint/light-client - version: 4ad913f2728307ec13a3b602b040c29b6a2117b8 + version: 5ba3d0bce406b4b4ce694ca4387b9d086ac0c10f subpackages: - certifiers - certifiers/client @@ -171,7 +171,7 @@ imports: - types - version - name: github.com/tendermint/tmlibs - version: 59a77e7bef092eef0e1f9b44c983dc9e35eed0d6 + version: bd9d0d1637dadf1330e167189d5e5031aadcda6f subpackages: - autofile - cli