Skip to content

Commit

Permalink
Fix edgecase in tipset skipcache
Browse files Browse the repository at this point in the history
  • Loading branch information
arajasek committed May 27, 2021
1 parent 21b4741 commit 9da93a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chain/store/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ func (ci *ChainIndex) fillCache(tsk types.TipSetKey) (*lbEntry, error) {
}

rheight -= ci.skipLength
if rheight < 0 {
rheight = 0
}

var skipTarget *types.TipSet
if parent.Height() < rheight {
Expand Down

0 comments on commit 9da93a6

Please sign in to comment.