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)
err = wire.ReadBinaryBytes(eyesStateBytes, &chainState)
if err != nil {
logger.Error("error reading MerkleEyesState", "err", err)
panic(err)
return nil, errors.Wrap(err, "Reading MerkleEyesState")
}
tree.Load(chainState.Hash)
}

View File

@ -33,7 +33,7 @@ func accountQueryCmd(cmd *cobra.Command, args []string) error {
acc := coin.Account{}
proof, err := proofcmd.GetAndParseAppProof(key, &acc)
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 {
return err
}

View File

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