From 762e85e26fc2efdcda10f8ad409047cb46a55e9d Mon Sep 17 00:00:00 2001 From: buddh0 Date: Fri, 16 Aug 2024 18:59:14 +0800 Subject: [PATCH] internal/ethapi: add debug log --- internal/ethapi/api.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 1a52e6f6ac..afa9802681 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -896,7 +896,10 @@ func (s *BlockChainAPI) getFinalizedNumber(ctx context.Context, probabilisticFin confirmedValSet[lastHeader.Coinbase] = struct{}{} } - return max(fastFinalizedHeader.Number.Int64(), lastHeader.Number.Int64()), nil + finalizedBlockNumber := max(fastFinalizedHeader.Number.Int64(), lastHeader.Number.Int64()) + log.Debug("getFinalizedNumber", "fastFinalizedHeight", fastFinalizedHeader.Number.Int64(), "probabilisticFinalizedHeight", + lastHeader.Number.Int64(), "finalizedBlockNumber", finalizedBlockNumber, "len(confirmedValSet)", len(confirmedValSet)) + return finalizedBlockNumber, nil } // GetFinalizedHeader returns the requested finalized block header.