mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 07:03:58 -05:00
21 lines
706 B
Go
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
|
|
}
|