Files
prysm/validator/client/key_reload.go
Bastin 92bd211e4d upgrade v6 to v7 (#15989)
* upgrade v6 to v7

* changelog

* update-go-ssz
2025-11-06 16:16:23 +00:00

21 lines
706 B
Go

package client
import (
"context"
fieldparams "github.com/OffchainLabs/prysm/v7/config/fieldparams"
"github.com/OffchainLabs/prysm/v7/monitoring/tracing/trace"
)
// HandleKeyReload makes sure the validator keeps operating correctly after a change to the underlying keys.
// It is also responsible for logging out information about the new state of keys.
func (v *validator) HandleKeyReload(ctx context.Context, currentKeys [][fieldparams.BLSPubkeyLength]byte) (bool, error) {
ctx, span := trace.StartSpan(ctx, "validator.HandleKeyReload")
defer span.End()
if err := v.updateValidatorStatusCache(ctx, currentKeys); err != nil {
return false, err
}
return v.checkAndLogValidatorStatus(), nil
}