mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
091525deb8
* ensure gazelle * fix up propose test * build * comment
37 lines
1.1 KiB
Go
37 lines
1.1 KiB
Go
package client
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
|
|
"github.com/prysmaticlabs/prysm/shared/bytesutil"
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
type attSubmitted struct {
|
|
data *ethpb.AttestationData
|
|
attesterIndices []uint64
|
|
aggregatorIndices []uint64
|
|
}
|
|
|
|
func (v *validator) LogAttestationsSubmitted() {
|
|
v.attLogsLock.Lock()
|
|
defer v.attLogsLock.Unlock()
|
|
|
|
for _, attLog := range v.attLogs {
|
|
log.WithFields(logrus.Fields{
|
|
"Slot": attLog.data.Slot,
|
|
"CommitteeIndex": attLog.data.CommitteeIndex,
|
|
"BeaconBlockRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.BeaconBlockRoot)),
|
|
"SourceEpoch": attLog.data.Source.Epoch,
|
|
"SourceRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.Source.Root)),
|
|
"TargetEpoch": attLog.data.Target.Epoch,
|
|
"TargetRoot": fmt.Sprintf("%#x", bytesutil.Trunc(attLog.data.Target.Root)),
|
|
"AttesterIndices": attLog.attesterIndices,
|
|
"AggregatorIndices": attLog.aggregatorIndices,
|
|
}).Info("Submitted new attestations")
|
|
}
|
|
|
|
v.attLogs = make(map[[32]byte]*attSubmitted)
|
|
}
|