2021-08-05 17:44:13 +00:00
|
|
|
package cache
|
|
|
|
|
2023-04-28 21:27:47 +00:00
|
|
|
import "github.com/pkg/errors"
|
2021-08-05 17:44:13 +00:00
|
|
|
|
2021-08-24 07:54:04 +00:00
|
|
|
var (
|
2021-08-26 05:01:09 +00:00
|
|
|
// ErrNilValueProvided for when we try to put a nil value in a cache.
|
|
|
|
ErrNilValueProvided = errors.New("nil value provided on Put()")
|
|
|
|
// ErrIncorrectType for when the state is of the incorrect type.
|
|
|
|
ErrIncorrectType = errors.New("incorrect state type provided")
|
2021-08-24 07:54:04 +00:00
|
|
|
// ErrNotFound for cache fetches that return a nil value.
|
|
|
|
ErrNotFound = errors.New("not found in cache")
|
|
|
|
// ErrNonExistingSyncCommitteeKey when sync committee key (root) does not exist in cache.
|
|
|
|
ErrNonExistingSyncCommitteeKey = errors.New("does not exist sync committee key")
|
|
|
|
errNotSyncCommitteeIndexPosition = errors.New("not syncCommitteeIndexPosition struct")
|
2023-04-28 21:27:47 +00:00
|
|
|
// ErrNotFoundRegistration when validator registration does not exist in cache.
|
|
|
|
ErrNotFoundRegistration = errors.Wrap(ErrNotFound, "no validator registered")
|
2023-12-18 16:12:43 +00:00
|
|
|
|
|
|
|
// ErrAlreadyInProgress appears when attempting to mark a cache as in progress while it is
|
|
|
|
// already in progress. The client should handle this error and wait for the in progress
|
|
|
|
// data to resolve via Get.
|
|
|
|
ErrAlreadyInProgress = errors.New("already in progress")
|
2021-08-24 07:54:04 +00:00
|
|
|
)
|