cmd: log errors
This commit is contained in:
parent
f156eb5bbd
commit
30da6eebb0
|
@ -1,6 +1,7 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/tendermint/basecoin/cmd/commands"
|
"github.com/tendermint/basecoin/cmd/commands"
|
||||||
|
@ -24,5 +25,9 @@ func main() {
|
||||||
commands.AccountCmd,
|
commands.AccountCmd,
|
||||||
commands.UnsafeResetAllCmd,
|
commands.UnsafeResetAllCmd,
|
||||||
}
|
}
|
||||||
app.Run(os.Args)
|
err := app.Run(os.Args)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,9 +119,11 @@ func cmdSendTx(c *cli.Context) error {
|
||||||
fmt.Println(string(wire.JSONBytes(tx)))
|
fmt.Println(string(wire.JSONBytes(tx)))
|
||||||
|
|
||||||
// broadcast the transaction to tendermint
|
// broadcast the transaction to tendermint
|
||||||
if _, _, err := broadcastTx(c, tx); err != nil {
|
data, log, err := broadcastTx(c, tx)
|
||||||
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
fmt.Printf("Response: %X ; %s\n", data, log)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ function waitForNode() {
|
||||||
i=0
|
i=0
|
||||||
while [ "$ERR" != 0 ]; do
|
while [ "$ERR" != 0 ]; do
|
||||||
if [[ "$i" == 10 ]]; then
|
if [[ "$i" == 10 ]]; then
|
||||||
echo "waited to long for chain to start"
|
echo "waited too long for chain to start"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "...... still waiting on $addr"
|
echo "...... still waiting on $addr"
|
||||||
|
|
Loading…
Reference in New Issue