prysm-pulse/beacon-chain/blockchain/log.go

18 lines
476 B
Go
Raw Normal View History

2019-08-24 17:51:00 +00:00
package blockchain
import (
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
2019-08-24 17:51:00 +00:00
"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,
"attestations": len(b.Body.Attestations),
"deposits": len(b.Body.Deposits),
}).Info("Finished applying state transition")
2019-08-24 17:51:00 +00:00
}