Skip to content

Commit 996c877

Browse files
authored
fix: use genesis when no intersect points provided for available range (#685)
1 parent 29ae994 commit 996c877

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

protocol/chainsync/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ func (c *Client) GetAvailableBlockRange(
223223
c.busyMutex.Lock()
224224
defer c.busyMutex.Unlock()
225225

226+
// Use origin if no intersect points were specified
227+
if len(intersectPoints) == 0 {
228+
intersectPoints = []common.Point{common.NewPointOrigin()}
229+
}
226230
// Find our chain intersection
227231
result := c.requestFindIntersect(intersectPoints)
228232
if result.error != nil {

0 commit comments

Comments
 (0)