mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 21:57:16 +00:00
21 lines
564 B
Go
21 lines
564 B
Go
|
package blockchain
|
||
|
|
||
|
import (
|
||
|
"encoding/hex"
|
||
|
|
||
|
ethpb "github.com/prysmaticlabs/prysm/proto/eth/v1alpha1"
|
||
|
"github.com/sirupsen/logrus"
|
||
|
)
|
||
|
|
||
|
var log = logrus.WithField("prefix", "blockchain")
|
||
|
|
||
|
// logs state transition related data every slot.
|
||
|
func logStateTransitionData(b *ethpb.BeaconBlock, r []byte) {
|
||
|
log.WithFields(logrus.Fields{
|
||
|
"slot": b.Slot,
|
||
|
"root": hex.EncodeToString(r),
|
||
|
"attestations": len(b.Body.Attestations),
|
||
|
"deposits": len(b.Body.Deposits),
|
||
|
}).Info("Finished state transition and updated fork choice store for block")
|
||
|
}
|