WIP commit

This commit is contained in:
Jae Kwon
2018-04-06 17:25:08 -07:00
parent a44e871dc7
commit 49fdf80d9d
25 changed files with 126 additions and 149 deletions
+3 -2
View File
@@ -25,6 +25,7 @@ import (
ctypes "github.com/tendermint/tendermint/rpc/core/types"
tmrpc "github.com/tendermint/tendermint/rpc/lib/server"
tmtypes "github.com/tendermint/tendermint/types"
pvm "github.com/tendermint/tendermint/types/priv_validator"
"github.com/tendermint/tmlibs/cli"
dbm "github.com/tendermint/tmlibs/db"
"github.com/tendermint/tmlibs/log"
@@ -341,7 +342,7 @@ func startTMAndLCD() (*nm.Node, net.Listener, error) {
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
logger = log.NewFilter(logger, log.AllowError())
privValidatorFile := config.PrivValidatorFile()
privVal := tmtypes.LoadOrGenPrivValidatorFS(privValidatorFile)
privVal := pvm.LoadOrGenFilePV(privValidatorFile)
dbs := map[string]dbm.DB{
"main": dbm.NewMemDB(),
"acc": dbm.NewMemDB(),
@@ -370,7 +371,7 @@ func startTMAndLCD() (*nm.Node, net.Listener, error) {
if err != nil {
return nil, nil, err
}
genDoc.AppStateJSON = stateBytes
genDoc.AppState = stateBytes
cdc := wire.NewCodec()
+2 -3
View File
@@ -7,7 +7,6 @@ import (
"strconv"
"github.com/spf13/cobra"
wire "github.com/tendermint/go-wire"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/context"
@@ -41,8 +40,8 @@ func printNodeStatus(cmd *cobra.Command, args []string) error {
return err
}
output, err := wire.MarshalJSON(status)
// output, err := json.MarshalIndent(res, " ", "")
output, err := cdc.MarshalJSON(status)
// output, err := cdc.MarshalJSONIndent(res, " ", "")
if err != nil {
return err
}
+17
View File
@@ -0,0 +1,17 @@
package rpc
import (
"github.com/cosmos/cosmos-sdk/wire"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
)
var cdc *wire.Codec
func init() {
cdc = wire.NewCodec()
RegisterWire(cdc)
}
func RegisterWire(cdc *wire.Codec) {
ctypes.RegisterAmino(cdc)
}