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