Skip to content

Commit a6d3aee

Browse files
authored
Merge pull request #158 from blinklabs-io/fix/chainsync-reconnect-intersect
fix: don't overwrite intersect with empty cursor cache
2 parents cda0ca8 + be4d7a9 commit a6d3aee

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)