Skip to content

Commit

Permalink
ipfs: add buffer for better batching
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed May 13, 2024
1 parent 370700b commit d37d4ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ipfs/provide.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (r *Reprovider) Run(ctx context.Context, interval, timeout time.Duration, b
// include a slight buffer for CIDs that are about to expire
// so they will be provided as one batch
buffer := interval / 10
minAnnouncement := time.Now().Add(-interval).Add(buffer)
minAnnouncement := time.Now().Add(-(interval - buffer))
for _, c := range cids {
// only provide CIDs that have not been provided within the
// last interval
Expand Down

0 comments on commit d37d4ea

Please sign in to comment.