mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-01 15:57:39 +00:00
22 lines
798 B
Go
22 lines
798 B
Go
package forkchoice
|
|
|
|
import (
|
|
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
|
|
"github.com/prysmaticlabs/prysm/shared/params"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
var log = logrus.WithField("prefix", "forkchoice")
|
|
|
|
// logs epoch related data during epoch boundary.
|
|
func logEpochData(beaconState *pb.BeaconState) {
|
|
log.WithFields(logrus.Fields{
|
|
"epoch": beaconState.Slot / params.BeaconConfig().SlotsPerEpoch,
|
|
"previousJustifiedEpoch": beaconState.PreviousJustifiedCheckpoint.Epoch,
|
|
"justifiedEpoch": beaconState.CurrentJustifiedCheckpoint.Epoch,
|
|
"finalizedEpoch": beaconState.FinalizedCheckpoint.Epoch,
|
|
"depositIndex": beaconState.Eth1DepositIndex,
|
|
"numValidators": len(beaconState.Validators),
|
|
}).Info("Starting next epoch")
|
|
}
|