2023-12-22 10:44:55 +00:00
|
|
|
package sync
|
|
|
|
|
|
|
|
import (
|
2024-01-16 08:23:02 +00:00
|
|
|
"github.com/ledgerwatch/erigon/polygon/heimdall"
|
2023-12-22 10:44:55 +00:00
|
|
|
)
|
|
|
|
|
2024-01-16 08:23:02 +00:00
|
|
|
func statePointsFromCheckpoints(checkpoints []*heimdall.Checkpoint) statePoints {
|
2023-12-22 10:44:55 +00:00
|
|
|
statePoints := make(statePoints, len(checkpoints))
|
|
|
|
for i, checkpoint := range checkpoints {
|
|
|
|
statePoints[i] = statePointFromCheckpoint(checkpoint)
|
|
|
|
}
|
|
|
|
|
|
|
|
return statePoints
|
|
|
|
}
|
|
|
|
|
2024-01-16 08:23:02 +00:00
|
|
|
func statePointsFromMilestones(milestones []*heimdall.Milestone) statePoints {
|
2023-12-22 10:44:55 +00:00
|
|
|
statePoints := make(statePoints, len(milestones))
|
|
|
|
for i, milestone := range milestones {
|
|
|
|
statePoints[i] = statePointFromMilestone(milestone)
|
|
|
|
}
|
|
|
|
|
|
|
|
return statePoints
|
|
|
|
}
|
|
|
|
|
|
|
|
type statePoints []*statePoint
|