fix: improve timeout message log (#996)

* fix: improve timeout message log

* Update bft_handler.go

---------

Co-authored-by: liam.lai <liam.lai@us>
This commit is contained in:
benjamin202410 2025-04-29 01:48:56 -07:00 committed by GitHub
parent 80abc58f25
commit e1772ce08a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,8 +113,6 @@ func (b *Bfter) Vote(peer string, vote *types.Vote) error {
return nil
}
func (b *Bfter) Timeout(peer string, timeout *types.Timeout) error {
log.Debug("Receive Timeout", "timeout", timeout)
gapNum := timeout.GapNumber
// dist times 3, ex: timeout message's gap number is based on block and find out it's epoch switch number, then mod 900 then minus 450
@ -128,6 +126,7 @@ func (b *Bfter) Timeout(peer string, timeout *types.Timeout) error {
log.Error("Verify BFT Timeout", "timeoutRound", timeout.Round, "timeoutGapNum", gapNum, "error", err)
return err
}
log.Debug("Receive Timeout", "gap", gapNum, "hash", timeout.Hash().Hex(), "round", timeout.Round, "signer", timeout.GetSigner().Hex()) //get signer after verifyTimeout
if verified {
b.broadcastCh <- timeout