From d0261f8ef5360e05ee964b034afd83b10de34615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CGheisMohammadi=E2=80=9D?= <36589218+GheisMohammadi@users.noreply.github.com> Date: Mon, 12 Feb 2024 19:13:29 +0800 Subject: [PATCH] log pending crosslinks once node starts --- node/node.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/node/node.go b/node/node.go index da42db0e4..7290f81a8 100644 --- a/node/node.go +++ b/node/node.go @@ -1183,6 +1183,24 @@ func New( node.serviceManager = service.NewManager() + // log all pending crosslinks + allPending, err := node.Blockchain().ReadPendingCrossLinks() + if err == nil { + for _, pending := range allPending { + utils.Logger().Info(). + Uint32("shard", pending.ShardID()). + Int64("epoch", pending.Epoch().Int64()). + Uint64("blockNum", pending.BlockNum()). + Int64("viewID", pending.ViewID().Int64()). + Interface("hash", pending.Hash()). + Msg("[PendingCrossLinksOnInit] pending cross links") + } + } else { + utils.Logger().Error(). + Err(err). + Msg("read pending cross links failed") + } + return &node }