From 390bf58f97b74f4820907fff311164e9e15c32fa Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Wed, 29 Jan 2020 17:56:21 +0300 Subject: [PATCH] consensus: use our implementations of Recovery* messages While decoding payload, local implementations of Recovery* messages were used, but when creating RecoveryMessage inside dBFT library default NewRecoveryMessage was invoked. This lead to parsing errors. --- pkg/consensus/consensus.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/consensus/consensus.go b/pkg/consensus/consensus.go index b6028ccab..acbfa49d6 100644 --- a/pkg/consensus/consensus.go +++ b/pkg/consensus/consensus.go @@ -139,6 +139,8 @@ func NewService(cfg Config) (Service, error) { dbft.WithNewPrepareResponse(func() payload.PrepareResponse { return new(prepareResponse) }), dbft.WithNewChangeView(func() payload.ChangeView { return new(changeView) }), dbft.WithNewCommit(func() payload.Commit { return new(commit) }), + dbft.WithNewRecoveryRequest(func() payload.RecoveryRequest { return new(recoveryRequest) }), + dbft.WithNewRecoveryMessage(func() payload.RecoveryMessage { return new(recoveryMessage) }), ) if srv.dbft == nil {