Skip to content

Commit be4d7a9

Browse files
committed
fix: don't overwrite intersect with empty cursor cache
Fixes #149
1 parent cda0ca8 commit be4d7a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

input/chainsync/chainsync.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ func (c *ChainSync) setupConnection() error {
231231
}
232232
}
233233
// Set the intersect points from the cursor cache
234-
c.intersectPoints = c.cursorCache[:]
234+
if len(c.cursorCache) > 0 {
235+
c.intersectPoints = c.cursorCache[:]
236+
}
235237
// Restart the connection
236238
if err := c.Start(); err != nil {
237239
if c.logger != nil {

0 commit comments

Comments
 (0)