consensus: fill preparation hash in recovery message

This commit is contained in:
Evgenii Stratonikov 2020-01-31 15:02:03 +03:00 committed by Roman Khimov
parent e441cb1414
commit e65b5c9914

View file

@ -177,6 +177,14 @@ func (s *service) eventLoop() {
if msg.Type() == payload.RecoveryMessageType {
rec := msg.GetRecoveryMessage().(*recoveryMessage)
if rec.preparationHash == nil {
req := rec.GetPrepareRequest(&msg, s.dbft.Validators, uint16(s.dbft.PrimaryIndex))
if req != nil {
h := req.Hash()
rec.preparationHash = &h
}
}
fields = append(fields,
zap.Int("#preparation", len(rec.preparationPayloads)),
zap.Int("#commit", len(rec.commitPayloads)),