Compiles and all tests pass - even IBC with new proofs
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user