From 2b5ca833f9e255ef773453fc19418516d4b40c41 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Mon, 9 Nov 2020 08:27:19 +0000 Subject: [PATCH] [log] print more log when verification failed Signed-off-by: Leo Chen --- consensus/view_change_construct.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/consensus/view_change_construct.go b/consensus/view_change_construct.go index 8fa29433a..0d4f5ce6d 100644 --- a/consensus/view_change_construct.go +++ b/consensus/view_change_construct.go @@ -202,6 +202,10 @@ func (vc *viewChange) VerifyNewViewMsg(recvMsg *FBFTMessage) (*types.Block, erro binary.LittleEndian.PutUint64(viewIDBytes, recvMsg.ViewID) if !m3Sig.VerifyHash(m3Mask.AggregatePublic, viewIDBytes) { + vc.getLogger().Warn(). + Bytes("viewIDBytes", viewIDBytes). + Interface("AggregatePublic", m3Mask.AggregatePublic). + Msg("m3Sig.VerifyHash Failed") return nil, errors.New("[VerifyNewViewMsg] Unable to Verify Aggregated Signature of M3 (ViewID) payload") } @@ -209,6 +213,10 @@ func (vc *viewChange) VerifyNewViewMsg(recvMsg *FBFTMessage) (*types.Block, erro if recvMsg.M2AggSig != nil { m2Sig := recvMsg.M2AggSig if !m2Sig.VerifyHash(m2Mask.AggregatePublic, NIL) { + vc.getLogger().Warn(). + Bytes("NIL", NIL). + Interface("AggregatePublic", m2Mask.AggregatePublic). + Msg("m2Sig.VerifyHash Failed") return nil, errors.New("[VerifyNewViewMsg] Unable to Verify Aggregated Signature of M2 (NIL) payload") } }