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
This commit is contained in:
terence tsao
2020-02-03 13:11:21 -08:00
committed by GitHub
parent 5b4025efcd
commit 8492273fa7

View File

@@ -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.