2021-12-09 22:23:00 +00:00
|
|
|
package kv
|
|
|
|
|
2022-03-09 19:33:18 +00:00
|
|
|
import "github.com/pkg/errors"
|
2021-12-09 22:23:00 +00:00
|
|
|
|
2022-04-06 21:24:00 +00:00
|
|
|
// ErrDeleteJustifiedAndFinalized is raised when we attempt to delete a finalized block/state
|
|
|
|
var ErrDeleteJustifiedAndFinalized = errors.New("cannot delete finalized block or state")
|
2022-02-08 23:26:26 +00:00
|
|
|
|
2021-12-09 22:23:00 +00:00
|
|
|
// ErrNotFound can be used directly, or as a wrapped DBError, whenever a db method needs to
|
|
|
|
// indicate that a value couldn't be found.
|
|
|
|
var ErrNotFound = errors.New("not found in db")
|
2022-03-09 19:33:18 +00:00
|
|
|
var ErrNotFoundState = errors.Wrap(ErrNotFound, "state not found")
|
2021-12-09 22:23:00 +00:00
|
|
|
|
|
|
|
// ErrNotFoundOriginBlockRoot is an error specifically for the origin block root getter
|
2022-03-09 19:33:18 +00:00
|
|
|
var ErrNotFoundOriginBlockRoot = errors.Wrap(ErrNotFound, "OriginBlockRoot")
|
2022-03-10 15:05:10 +00:00
|
|
|
|
2022-03-28 21:01:55 +00:00
|
|
|
// ErrNotFoundGenesisBlockRoot means no genesis block root was found, indicating the db was not initialized with genesis
|
|
|
|
var ErrNotFoundGenesisBlockRoot = errors.Wrap(ErrNotFound, "OriginGenesisRoot")
|
|
|
|
|
2022-05-19 04:38:04 +00:00
|
|
|
// ErrNotFoundBackfillBlockRoot is an error specifically for the origin block root getter
|
2022-03-28 21:01:55 +00:00
|
|
|
var ErrNotFoundBackfillBlockRoot = errors.Wrap(ErrNotFound, "BackfillBlockRoot")
|
|
|
|
|
2022-03-10 15:05:10 +00:00
|
|
|
// ErrNotFoundFeeRecipient is a not found error specifically for the fee recipient getter
|
|
|
|
var ErrNotFoundFeeRecipient = errors.Wrap(ErrNotFound, "fee recipient")
|