erigon-pulse/consensus/bor/finality/rawdb/checkpoint.go
Anshal Shukla 076dc33232
move borfinality package out of eth (#8407)
- Move borfinality out of eth package
- Adds nil pointer check in bor_verifier
2023-10-09 19:13:31 +01:00

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
}