mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 03:51:20 +00:00
33d8c08c1c
This is the initial merge for polygon milestones it implements an rpc call used by heimdall but does not directly impact any chain processing
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
|
|
}
|