erigon-pulse/polygon/sync/state_points.go
milen 64072ce6c7
polygon/sync: implement header downloader (#9030)
Co-authored-by: battlmonstr <battlmonstr@users.noreply.github.com>
2023-12-22 10:44:55 +00:00

27 lines
703 B
Go

package sync
import (
"github.com/ledgerwatch/erigon/consensus/bor/heimdall/checkpoint"
"github.com/ledgerwatch/erigon/consensus/bor/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