mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27:38 +00:00
2793ef6ec1
* move mocks to the owner packages * squash single file packages * move types to more appropriate files * remove unused mocks
26 lines
617 B
Go
26 lines
617 B
Go
package sync
|
|
|
|
import (
|
|
"github.com/ledgerwatch/erigon/polygon/heimdall"
|
|
)
|
|
|
|
func statePointsFromCheckpoints(checkpoints []*heimdall.Checkpoint) statePoints {
|
|
statePoints := make(statePoints, len(checkpoints))
|
|
for i, checkpoint := range checkpoints {
|
|
statePoints[i] = statePointFromCheckpoint(checkpoint)
|
|
}
|
|
|
|
return statePoints
|
|
}
|
|
|
|
func statePointsFromMilestones(milestones []*heimdall.Milestone) statePoints {
|
|
statePoints := make(statePoints, len(milestones))
|
|
for i, milestone := range milestones {
|
|
statePoints[i] = statePointFromMilestone(milestone)
|
|
}
|
|
|
|
return statePoints
|
|
}
|
|
|
|
type statePoints []*statePoint
|