Browse Source

log stack trace on consensus failure

pull/697/head
Ethan Buchman 7 years ago
parent
commit
8c6bd44929
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      blockchain/reactor.go
  2. +2
    -1
      consensus/state.go

+ 1
- 1
blockchain/reactor.go View File

@ -235,7 +235,7 @@ FOR_LOOP:
err := bcR.state.Validators.VerifyCommit(
bcR.state.ChainID, types.BlockID{first.Hash(), firstPartsHeader}, first.Height, second.LastCommit)
if err != nil {
bcR.Logger.Info("error in validation", "err", err)
bcR.Logger.Error("Error in validation", "err", err)
bcR.pool.RedoRequest(first.Height)
break SYNC_LOOP
} else {


+ 2
- 1
consensus/state.go View File

@ -6,6 +6,7 @@ import (
"fmt"
"path/filepath"
"reflect"
"runtime/debug"
"sync"
"time"
@ -609,7 +610,7 @@ func (cs *ConsensusState) newStep() {
func (cs *ConsensusState) receiveRoutine(maxSteps int) {
defer func() {
if r := recover(); r != nil {
cs.Logger.Error("CONSENSUS FAILURE!!!", "err", r)
cs.Logger.Error("CONSENSUS FAILURE!!!", "err", r, "stack", string(debug.Stack()))
}
}()


Loading…
Cancel
Save