[log] print more log when verification failed

Signed-off-by: Leo Chen <leo@harmony.one>
pull/3448/head
Leo Chen 4 years ago
parent 42e38aa4d7
commit 2b5ca833f9
  1. 8
      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")
}
}

Loading…
Cancel
Save