diff --git a/core/blockchain.go b/core/blockchain.go index 56d9b86f14..c468e42695 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -23,6 +23,7 @@ import ( "io" "math/big" mrand "math/rand" + "os" "sync" "sync/atomic" "time" @@ -1201,9 +1202,10 @@ func (bc *BlockChain) insertChain(chain types.Blocks) (int, []interface{}, []*ty err := bc.UpdateM1() if err != nil { if err == ErrNotPoSV { - 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) } } } diff --git a/miner/worker.go b/miner/worker.go index f2aae7da3b..8c6beb8c65 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -20,6 +20,7 @@ import ( "bytes" "fmt" "math/big" + "os" "sync" "sync/atomic" "time" @@ -596,9 +597,10 @@ func (self *worker) commitNewWork() { err := self.chain.UpdateM1() if err != nil { if err == core.ErrNotPoSV { - 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) } } }