From 8492273fa7d5b278d609e7f883dd8dac23cd2f39 Mon Sep 17 00:00:00 2001 From: terence tsao Date: Mon, 3 Feb 2020 13:11:21 -0800 Subject: [PATCH] Better log for `Requesting block for pending attestation...` (#4731) * Better log * Use debug * Merge branch 'master' into req-blk-log * Merge branch 'master' into req-blk-log --- beacon-chain/sync/pending_attestations_queue.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/beacon-chain/sync/pending_attestations_queue.go b/beacon-chain/sync/pending_attestations_queue.go index 8ba806e706..c250015c98 100644 --- a/beacon-chain/sync/pending_attestations_queue.go +++ b/beacon-chain/sync/pending_attestations_queue.go @@ -90,7 +90,12 @@ func (s *Service) processPendingAtts(ctx context.Context) error { delete(s.blkRootToPendingAtts, bRoot) } else { // Pending attestation's missing block has not arrived yet. - log.WithField("blockRoot", hex.EncodeToString(bytesutil.Trunc(bRoot[:]))).Info("Requesting block for pending attestation") + log.WithFields(logrus.Fields{ + "currentSlot": s.chain.CurrentSlot(), + "attSlot": attestations[0].Aggregate.Data.Slot, + "attCount": len(attestations), + "blockRoot": hex.EncodeToString(bytesutil.Trunc(bRoot[:])), + }).Debug("Requesting block for pending attestation") // Start with a random peer to query, but choose the first peer in our unsorted list that claims to // have a head slot newer or equal to the pending attestation's target boundary slot.