mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 04:03:49 +00:00
076dc33232
- Move borfinality out of eth package - Adds nil pointer check in bor_verifier
34 lines
1.1 KiB
Go
34 lines
1.1 KiB
Go
// nolint
|
|
package rawdb
|
|
|
|
import (
|
|
"errors"
|
|
|
|
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
|
)
|
|
|
|
var (
|
|
lastCheckpoint = []byte("LastCheckpoint")
|
|
|
|
ErrEmptyLastFinality = errors.New("empty response while getting last finality")
|
|
ErrIncorrectFinality = errors.New("last checkpoint in the DB is incorrect")
|
|
ErrIncorrectFinalityToStore = errors.New("failed to marshal the last finality struct")
|
|
ErrDBNotResponding = errors.New("failed to store the last finality struct")
|
|
ErrIncorrectLockFieldToStore = errors.New("failed to marshal the lockField struct ")
|
|
ErrIncorrectLockField = errors.New("lock field in the DB is incorrect")
|
|
ErrIncorrectFutureMilestoneFieldToStore = errors.New("failed to marshal the future milestone field struct ")
|
|
ErrIncorrectFutureMilestoneField = errors.New("future milestone field in the DB is incorrect")
|
|
)
|
|
|
|
type Checkpoint struct {
|
|
Finality
|
|
}
|
|
|
|
func (c *Checkpoint) clone() *Checkpoint {
|
|
return &Checkpoint{}
|
|
}
|
|
|
|
func (c *Checkpoint) block() (uint64, libcommon.Hash) {
|
|
return c.Block, c.Hash
|
|
}
|