Compiles and all tests pass - even IBC with new proofs

This commit is contained in:
Ethan Frey
2017-08-04 20:02:23 +02:00
parent 831c9ae3ec
commit 0de3ecc741
6 changed files with 28 additions and 15 deletions
@@ -2,7 +2,9 @@ package commands
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/basecoin/client/commands"
proofcmd "github.com/tendermint/basecoin/client/commands/proofs"
"github.com/tendermint/basecoin/docs/guide/counter/plugins/counter"
@@ -17,13 +19,14 @@ var CounterQueryCmd = &cobra.Command{
}
func counterQueryCmd(cmd *cobra.Command, args []string) error {
key := stack.PrefixedKey(counter.NameCounter, counter.StateKey())
var cp counter.State
proof, err := proofcmd.GetAndParseAppProof(key, &cp)
prove := !viper.GetBool(commands.FlagTrustNode)
key := stack.PrefixedKey(counter.NameCounter, counter.StateKey())
h, err := proofcmd.GetParsed(key, &cp, prove)
if err != nil {
return err
}
return proofcmd.OutputProof(cp, proof.BlockHeight())
return proofcmd.OutputProof(cp, h)
}