Last cleanup

This commit is contained in:
Ethan Frey 2017-07-27 14:05:28 -04:00
parent 2b79aa0413
commit 27e7fbe4cf
3 changed files with 4 additions and 13 deletions

View File

@ -90,8 +90,7 @@ func NewStore(dbName string, cacheSize int, logger log.Logger) (*Store, error) {
eyesStateBytes := db.Get(stateKey) eyesStateBytes := db.Get(stateKey)
err = wire.ReadBinaryBytes(eyesStateBytes, &chainState) err = wire.ReadBinaryBytes(eyesStateBytes, &chainState)
if err != nil { if err != nil {
logger.Error("error reading MerkleEyesState", "err", err) return nil, errors.Wrap(err, "Reading MerkleEyesState")
panic(err)
} }
tree.Load(chainState.Hash) tree.Load(chainState.Hash)
} }

View File

@ -33,7 +33,7 @@ func accountQueryCmd(cmd *cobra.Command, args []string) error {
acc := coin.Account{} acc := coin.Account{}
proof, err := proofcmd.GetAndParseAppProof(key, &acc) proof, err := proofcmd.GetAndParseAppProof(key, &acc)
if lc.IsNoDataErr(err) { if lc.IsNoDataErr(err) {
return errors.Errorf("Account bytes are empty for address %X ", addr) return errors.Errorf("Account bytes are empty for address %s ", addr)
} else if err != nil { } else if err != nil {
return err return err
} }

View File

@ -58,16 +58,8 @@ func readSendTxFlags() (tx basecoin.Tx, err error) {
} }
// craft the inputs and outputs // craft the inputs and outputs
ins := []coin.TxInput{{ tx = coin.NewSendOneTx(fromAddr, toAddr, amountCoins)
Address: fromAddr, return
Coins: amountCoins,
}}
outs := []coin.TxOutput{{
Address: toAddr,
Coins: amountCoins,
}}
return coin.NewSendTx(ins, outs), nil
} }
func readFromAddr() (basecoin.Actor, error) { func readFromAddr() (basecoin.Actor, error) {