erigon-pulse/polygon/sync/state_points.go
battlmonstr 2793ef6ec1
polygon: flatten redundant packages (#9241)
* move mocks to the owner packages
* squash single file packages
* move types to more appropriate files
* remove unused mocks
2024-01-16 09:23:02 +01:00

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