Skip to content

Commit

Permalink
Merge pull request #88 from nspcc-dev/adj-cv-logs
Browse files Browse the repository at this point in the history
dbft: improve "ignoring"-related debug messages
  • Loading branch information
roman-khimov authored Jan 30, 2024
2 parents 8b6cbaa + 3ff22d5 commit 6d59675
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dbft.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ func (d *DBFT) onPrepareRequest(msg payload.ConsensusPayload) {
// ignore prepareRequest if we had already received it or
// are in process of changing view
if d.RequestSentOrReceived() { //|| (d.ViewChanging() && !d.MoreThanFNodesCommittedOrLost()) {
d.Logger.Debug("ignoring PrepareRequest due to view changing",
d.Logger.Debug("ignoring PrepareRequest",
zap.Bool("sor", d.RequestSentOrReceived()),
zap.Bool("viewChanging", d.ViewChanging()),
zap.Bool("moreThanF", d.MoreThanFNodesCommittedOrLost()))
Expand Down Expand Up @@ -422,7 +422,11 @@ func (d *DBFT) onPrepareResponse(msg payload.ConsensusPayload) {
// ignore PrepareResponse if in process of changing view
m := d.PreparationPayloads[msg.ValidatorIndex()]
if m != nil || d.ViewChanging() && !d.MoreThanFNodesCommittedOrLost() {
d.Logger.Debug("ignoring PrepareResponse because of view changing")
d.Logger.Debug("ignoring PrepareResponse",
zap.Bool("dup", m != nil),
zap.Bool("sor", d.RequestSentOrReceived()),
zap.Bool("viewChanging", d.ViewChanging()),
zap.Bool("moreThanF", d.MoreThanFNodesCommittedOrLost()))
return
}

Expand Down

0 comments on commit 6d59675

Please sign in to comment.