Skip to content

Commit

Permalink
fix: use genesis when no intersect points provided for available range (
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored Aug 16, 2024
1 parent 29ae994 commit 996c877
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protocol/chainsync/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ func (c *Client) GetAvailableBlockRange(
c.busyMutex.Lock()
defer c.busyMutex.Unlock()

// Use origin if no intersect points were specified
if len(intersectPoints) == 0 {
intersectPoints = []common.Point{common.NewPointOrigin()}
}
// Find our chain intersection
result := c.requestFindIntersect(intersectPoints)
if result.error != nil {
Expand Down

0 comments on commit 996c877

Please sign in to comment.