mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-10 05:47:59 -05:00
updating log to print tracked validators size
This commit is contained in:
6
beacon-chain/cache/tracked_validators.go
vendored
6
beacon-chain/cache/tracked_validators.go
vendored
@@ -47,3 +47,9 @@ func (t *TrackedValidatorsCache) Validating() bool {
|
||||
defer t.Unlock()
|
||||
return len(t.trackedValidators) > 0
|
||||
}
|
||||
|
||||
func (t *TrackedValidatorsCache) Size() int {
|
||||
t.Lock()
|
||||
defer t.Unlock()
|
||||
return len(t.trackedValidators)
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ func (vs *Server) PrepareBeaconProposer(
|
||||
_ context.Context, request *ethpb.PrepareBeaconProposerRequest,
|
||||
) (*emptypb.Empty, error) {
|
||||
var validatorIndices []primitives.ValidatorIndex
|
||||
|
||||
beforeCacheSize := vs.TrackedValidatorsCache.Size()
|
||||
for _, r := range request.Recipients {
|
||||
recipient := hexutil.Encode(r.FeeRecipient)
|
||||
if !common.IsHexAddress(recipient) {
|
||||
@@ -428,7 +428,9 @@ func (vs *Server) PrepareBeaconProposer(
|
||||
}
|
||||
if len(validatorIndices) != 0 {
|
||||
log.WithFields(logrus.Fields{
|
||||
"validatorCount": len(validatorIndices),
|
||||
"validatorCount": len(validatorIndices),
|
||||
"previousTotalTrackedValidators": beforeCacheSize,
|
||||
"totalTrackedValidators": vs.TrackedValidatorsCache.Size(),
|
||||
}).Debug("Updated fee recipient addresses for validator indices")
|
||||
}
|
||||
return &emptypb.Empty{}, nil
|
||||
|
||||
Reference in New Issue
Block a user