Skip to content

Commit

Permalink
[blockindex] reduce indexbuilder PutBlocks() size to 100
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinxie committed Dec 22, 2024
1 parent e53ef04 commit fcc3fa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockindex/indexbuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ func (ib *IndexBuilder) init(ctx context.Context) error {
return err
}
blks = append(blks, blk)
// commit once every 5000 blocks
if startHeight%5000 == 0 || startHeight == tipHeight {
// commit once every 100 blocks
if startHeight%100 == 0 || startHeight == tipHeight {
if err := ib.indexer.PutBlocks(gCtx, blks); err != nil {
return err
}
Expand Down

0 comments on commit fcc3fa7

Please sign in to comment.