diff --git a/cmd/XDC/config.go b/cmd/XDC/config.go index 874e26ae9c..522bc88dae 100644 --- a/cmd/XDC/config.go +++ b/cmd/XDC/config.go @@ -24,19 +24,19 @@ import ( "os" "reflect" "unicode" - + "strings" "gopkg.in/urfave/cli.v1" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/dashboard" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/internal/debug" + "github.com/ethereum/go-ethereum/log" "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/params" whisper "github.com/ethereum/go-ethereum/whisper/whisperv6" "github.com/naoina/toml" - "strings" - "github.com/ethereum/go-ethereum/log" + " ) var ( diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 2205a5ef3a..144b46e959 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -653,7 +653,7 @@ func setListenAddress(ctx *cli.Context, cfg *p2p.Config) { // setNAT creates a port mapper from command line flags. func setNAT(ctx *cli.Context, cfg *p2p.Config) { if ctx.GlobalIsSet(NATFlag.Name) { - log.Info("NAT is setted","value",ctx.GlobalString(NATFlag.Name)) + log.Info("NAT is setted", "value", ctx.GlobalString(NATFlag.Name)) natif, err := nat.Parse(ctx.GlobalString(NATFlag.Name)) if err != nil { Fatalf("Option %s: %v", NATFlag.Name, err) diff --git a/core/blockchain.go b/core/blockchain.go index bf661863ab..c150a27be5 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -23,10 +23,11 @@ import ( "io" "math/big" mrand "math/rand" + "os" + "sort" "sync" "sync/atomic" "time" - "sort" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -1203,9 +1204,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty err := bc.UpdateM1() if err != nil { if err == ErrNotXDPoS { - log.Crit("Error when update M1 ", "err", err) + log.Error("Stopping node", "err", err) + os.Exit(1) } else { - log.Error("Error when update M1 ", "err", err) + log.Error("Error when update masternodes set. Keep the current masternodes set for the next epoch.", "err", err) } } } @@ -1400,7 +1402,7 @@ func (bc *BlockChain) PostChainEvents(events []interface{}, logs []*types.Log) { } func (bc *BlockChain) update() { - futureTimer := time.NewTicker(5 * time.Second) + futureTimer := time.NewTicker(10 * time.Millisecond) defer futureTimer.Stop() for { select { diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 510c3ca4db..e06116baf2 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1221,9 +1221,9 @@ func submitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c return common.Hash{}, err } addr := crypto.CreateAddress(from, tx.Nonce()) - log.Info("Submitted contract creation", "fullhash", tx.Hash().Hex(), "contract", addr.Hex()) + log.Trace("Submitted contract creation", "fullhash", tx.Hash().Hex(), "contract", addr.Hex()) } else { - log.Info("Submitted transaction", "fullhash", tx.Hash().Hex(), "recipient", tx.To()) + log.Trace("Submitted transaction", "fullhash", tx.Hash().Hex(), "recipient", tx.To()) } return tx.Hash(), nil }