new library orders

This commit is contained in:
rigel rozanski
2017-07-19 04:51:36 -04:00
parent 8617841296
commit ac1ecc10c4
30 changed files with 55 additions and 43 deletions
+3 -3
View File
@@ -15,19 +15,19 @@ import (
"github.com/spf13/pflag"
"github.com/spf13/viper"
"github.com/tendermint/light-client/certifiers"
"github.com/tendermint/light-client/certifiers/files"
"github.com/tendermint/tmlibs/cli"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/light-client/certifiers"
"github.com/tendermint/light-client/certifiers/files"
)
var (
dirPerm = os.FileMode(0700)
)
//nolint
const (
SeedFlag = "seed"
HashFlag = "valhash"
+2 -3
View File
@@ -8,12 +8,11 @@ import (
wire "github.com/tendermint/go-wire"
"github.com/tendermint/go-wire/data"
lc "github.com/tendermint/light-client"
"github.com/tendermint/light-client/proofs"
"github.com/tendermint/tendermint/rpc/client"
lc "github.com/tendermint/light-client"
"github.com/tendermint/basecoin/client/commands"
"github.com/tendermint/light-client/proofs"
)
// GetAndParseAppProof does most of the work of the query commands, but is quite
+5 -4
View File
@@ -4,24 +4,25 @@ import (
"github.com/spf13/cobra"
"github.com/tendermint/go-wire/data"
"github.com/tendermint/light-client/proofs"
"github.com/tendermint/basecoin/client/commands"
"github.com/tendermint/light-client/proofs"
)
var KeyCmd = &cobra.Command{
// KeyQueryCmd - CLI command to query a state by key with proof
var KeyQueryCmd = &cobra.Command{
Use: "key [key]",
Short: "Handle proofs for state of abci app",
Long: `This will look up a given key in the abci app, verify the proof,
and output it as hex.
If you want json output, use an app-specific command that knows key and value structure.`,
RunE: commands.RequireInit(doKeyQuery),
RunE: commands.RequireInit(keyQueryCmd),
}
// Note: we cannot yse GetAndParseAppProof here, as we don't use go-wire to
// parse the object, but rather return the raw bytes
func doKeyQuery(cmd *cobra.Command, args []string) error {
func keyQueryCmd(cmd *cobra.Command, args []string) error {
// parse cli
height := GetHeight()
key, err := ParseHexKey(args, "key")
+7 -4
View File
@@ -3,13 +3,16 @@ package proofs
import (
"github.com/spf13/cobra"
"github.com/tendermint/basecoin/client/commands"
"github.com/tendermint/light-client/proofs"
"github.com/tendermint/basecoin/client/commands"
)
//nolint TODO add description
var TxPresenters = proofs.NewPresenters()
var TxCmd = &cobra.Command{
// TxQueryCmd - CLI command to query a transaction with proof
var TxQueryCmd = &cobra.Command{
Use: "tx [txhash]",
Short: "Handle proofs of commited txs",
Long: `Proofs allows you to validate abci state with merkle proofs.
@@ -18,10 +21,10 @@ These proofs tie the data to a checkpoint, which is managed by "seeds".
Here we can validate these proofs and import/export them to prove specific
data to other peers as needed.
`,
RunE: commands.RequireInit(doTxQuery),
RunE: commands.RequireInit(txQueryCmd),
}
func doTxQuery(cmd *cobra.Command, args []string) error {
func txQueryCmd(cmd *cobra.Command, args []string) error {
// parse cli
height := GetHeight()
bkey, err := ParseHexKey(args, "txhash")
+3 -4
View File
@@ -7,14 +7,13 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log"
certclient "github.com/tendermint/light-client/certifiers/client"
"github.com/tendermint/tendermint/rpc/client"
"github.com/tendermint/tendermint/rpc/core"
rpc "github.com/tendermint/tendermint/rpc/lib/server"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log"
certclient "github.com/tendermint/light-client/certifiers/client"
"github.com/tendermint/basecoin/client/commands"
)
+1
View File
@@ -2,6 +2,7 @@ package rpc
import (
"github.com/spf13/cobra"
"github.com/tendermint/basecoin/client/commands"
)
+1 -1
View File
@@ -6,9 +6,9 @@ import (
"github.com/spf13/cobra"
"github.com/tendermint/go-wire/data"
certclient "github.com/tendermint/light-client/certifiers/client"
"github.com/tendermint/tendermint/rpc/client"
certclient "github.com/tendermint/light-client/certifiers/client"
"github.com/tendermint/basecoin/client/commands"
)
+1
View File
@@ -3,6 +3,7 @@ package rpc
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/basecoin/client/commands"
)
+1
View File
@@ -4,6 +4,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/basecoin/client/commands"
)
+2
View File
@@ -6,7 +6,9 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/light-client/certifiers"
"github.com/tendermint/basecoin/client/commands"
)
+2
View File
@@ -7,7 +7,9 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/light-client/certifiers"
"github.com/tendermint/basecoin/client/commands"
)
+2
View File
@@ -4,7 +4,9 @@ import (
"fmt"
"github.com/spf13/cobra"
"github.com/tendermint/light-client/certifiers"
"github.com/tendermint/basecoin/client/commands"
)
+1
View File
@@ -2,6 +2,7 @@ package txs
import (
"github.com/pkg/errors"
wire "github.com/tendermint/go-wire"
"github.com/tendermint/light-client/proofs"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
+1
View File
@@ -9,6 +9,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/tendermint/basecoin"
)