Skip to content

Commit

Permalink
Add log messages on commit() errors (ethereum#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariano Cortesi authored and celo-ci-bot-user committed Jan 7, 2020
1 parent 8eae111 commit a9c4647
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions consensus/istanbul/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,15 @@ func (c *core) commit() error {
if proposal != nil {
aggregatedSeal, err := GetAggregatedSeal(c.current.Commits(), c.current.Round())
if err != nil {
c.waitForDesiredRound(new(big.Int).Add(c.current.Round(), common.Big1))
nextRound := new(big.Int).Add(c.current.Round(), common.Big1)
c.logger.Warn("Error on commit, waiting for desired round", "reason", "getAggregatedSeal", "err", err, "desired_round", nextRound)
c.waitForDesiredRound(nextRound)
return nil
}
if err := c.backend.Commit(proposal, aggregatedSeal); err != nil {
c.waitForDesiredRound(new(big.Int).Add(c.current.Round(), common.Big1))
nextRound := new(big.Int).Add(c.current.Round(), common.Big1)
c.logger.Warn("Error on commit, waiting for desired round", "reason", "backend.Commit", "err", err, "desired_round", nextRound)
c.waitForDesiredRound(nextRound)
return nil
}
}
Expand Down

0 comments on commit a9c4647

Please sign in to comment.