forked from TrueCloudLab/neoneo-go
consensus: fill preparation hash in recovery message
This commit is contained in:
parent
e441cb1414
commit
e65b5c9914
1 changed files with 8 additions and 0 deletions
|
@ -177,6 +177,14 @@ func (s *service) eventLoop() {
|
||||||
|
|
||||||
if msg.Type() == payload.RecoveryMessageType {
|
if msg.Type() == payload.RecoveryMessageType {
|
||||||
rec := msg.GetRecoveryMessage().(*recoveryMessage)
|
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,
|
fields = append(fields,
|
||||||
zap.Int("#preparation", len(rec.preparationPayloads)),
|
zap.Int("#preparation", len(rec.preparationPayloads)),
|
||||||
zap.Int("#commit", len(rec.commitPayloads)),
|
zap.Int("#commit", len(rec.commitPayloads)),
|
||||||
|
|
Loading…
Reference in a new issue