From 730b9bd8a30a6707a59d43eed5bfab7d308ed4d5 Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:49:33 -0700 Subject: [PATCH] doc updates --- CHANGELOG.md | 2 +- bitswap/server/internal/decision/engine.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 02693fa5b..4a4c5d43a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ The following emojis are used to highlight certain changes: ## [Unreleased] ### Added -🛠 - New non variadic `NotifyNewBlock` function. This changes the `blockservice.Interface`. The reason for this change is to avoid allocating a slice on each call when called with one block. +🛠 - New non variadic `NotifyNewBlock` function. This changes the `blockservice.Interface`. The new function avoids allocating a slice on each call when called with one block. * `boxo/bitswap/server`: * A new [`WithWantHaveReplaceSize(n)`](https://pkg.go.dev/github.com/ipfs/boxo/bitswap/server/#WithWantHaveReplaceSize) option can be used with `bitswap.New` to fine-tune cost-vs-performance. It sets the maximum size of a block in bytes up to which the bitswap server will replace a WantHave with a WantBlock response. Setting this to 0 disables this WantHave replacement and means that block sizes are not read when processing WantHave requests. [#672](https://github.com/ipfs/boxo/pull/672) diff --git a/bitswap/server/internal/decision/engine.go b/bitswap/server/internal/decision/engine.go index 5e4463e33..e67c15fda 100644 --- a/bitswap/server/internal/decision/engine.go +++ b/bitswap/server/internal/decision/engine.go @@ -977,8 +977,9 @@ func (e *Engine) ReceivedBlocks(from peer.ID, blks []blocks.Block) { } } -// NotifyNewBlocks is called when new blocks becomes available locally, and in particular when the caller of bitswap -// decide to store those blocks and make them available on the network. +// NotifyNewBlocks is called when new blocks become available locally, and in +// particular when the caller of bitswap decides to store those blocks and make +// them available on the network. func (e *Engine) NotifyNewBlocks(blks []blocks.Block) { if len(blks) == 0 { return