erigon-pulse/polygon/sync/state_points.go
2024-01-09 19:20:42 +01:00

27 lines
691 B
Go

package sync
import (
"github.com/ledgerwatch/erigon/polygon/heimdall/checkpoint"
"github.com/ledgerwatch/erigon/polygon/heimdall/milestone"
)
func statePointsFromCheckpoints(checkpoints []*checkpoint.Checkpoint) statePoints {
statePoints := make(statePoints, len(checkpoints))
for i, checkpoint := range checkpoints {
statePoints[i] = statePointFromCheckpoint(checkpoint)
}
return statePoints
}
func statePointsFromMilestones(milestones []*milestone.Milestone) statePoints {
statePoints := make(statePoints, len(milestones))
for i, milestone := range milestones {
statePoints[i] = statePointFromMilestone(milestone)
}
return statePoints
}
type statePoints []*statePoint