Skip to content

Commit

Permalink
fix potential underflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Jul 26, 2021
1 parent 18caefc commit 57a8eb8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion blockstore/splitstore/splitstore_warmup.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,11 @@ func (s *SplitStore) warmup(curTs *types.TipSet) error {
// and headers all the way up to genesis.
// objects are written in batches so as to minimize overhead.
func (s *SplitStore) doWarmup(curTs *types.TipSet) error {
var boundaryEpoch abi.ChainEpoch
epoch := curTs.Height()
boundaryEpoch := epoch - WarmupBoundary
if WarmupBoundary < epoch {
boundaryEpoch = epoch - WarmupBoundary
}
batchHot := make([]blocks.Block, 0, batchSize)
count := int64(0)
xcount := int64(0)
Expand Down

0 comments on commit 57a8eb8

Please sign in to comment.