From 905e6a43b313f7971c290d518a6efff70672f4e4 Mon Sep 17 00:00:00 2001 From: gammazero <11790789+gammazero@users.noreply.github.com> Date: Fri, 20 Sep 2024 12:42:39 -0700 Subject: [PATCH] Use consistent option name WantHaveReplaceSize --- config/internal.go | 2 +- core/node/bitswap.go | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/internal.go b/config/internal.go index 7d1871e9954..f43746534a3 100644 --- a/config/internal.go +++ b/config/internal.go @@ -14,5 +14,5 @@ type InternalBitswap struct { EngineTaskWorkerCount OptionalInteger MaxOutstandingBytesPerPeer OptionalInteger ProviderSearchDelay OptionalDuration - ReplaceHasWithBlockMaxSize OptionalInteger + WantHaveReplaceSize OptionalInteger } diff --git a/core/node/bitswap.go b/core/node/bitswap.go index d1d8a1e4b48..4132d5a0186 100644 --- a/core/node/bitswap.go +++ b/core/node/bitswap.go @@ -23,7 +23,7 @@ const ( DefaultEngineTaskWorkerCount = 8 DefaultMaxOutstandingBytesPerPeer = 1 << 20 DefaultProviderSearchDelay = 1000 * time.Millisecond - DefaultReplaceHasWithBlockMaxSize = 1024 + DefaultWantHaveReplaceSize = 1024 ) type bitswapOptionsOut struct { @@ -48,7 +48,7 @@ func BitswapOptions(cfg *config.Config, provide bool) interface{} { bitswap.TaskWorkerCount(int(internalBsCfg.TaskWorkerCount.WithDefault(DefaultTaskWorkerCount))), bitswap.EngineTaskWorkerCount(int(internalBsCfg.EngineTaskWorkerCount.WithDefault(DefaultEngineTaskWorkerCount))), bitswap.MaxOutstandingBytesPerPeer(int(internalBsCfg.MaxOutstandingBytesPerPeer.WithDefault(DefaultMaxOutstandingBytesPerPeer))), - bitswap.WithReplaceHasWithBlockMaxSize(int(internalBsCfg.ReplaceHasWithBlockMaxSize.WithDefault(DefaultReplaceHasWithBlockMaxSize))), + bitswap.WithWantHaveReplaceSize(int(internalBsCfg.WantHaveReplaceSize.WithDefault(DefaultWantHaveReplaceSize))), } return bitswapOptionsOut{BitswapOpts: opts} diff --git a/go.mod b/go.mod index b3e92f50fed..9e3c8111e33 100644 --- a/go.mod +++ b/go.mod @@ -18,7 +18,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/ipfs-shipyard/nopfs v0.0.12 github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c - github.com/ipfs/boxo v0.23.1-0.20240914020010-ff77293b4d47 + github.com/ipfs/boxo v0.23.1-0.20240920193856-639ef65ebcb1 github.com/ipfs/go-block-format v0.2.0 github.com/ipfs/go-cid v0.4.1 github.com/ipfs/go-cidutil v0.1.0 diff --git a/go.sum b/go.sum index 203db5fa732..64e9008b774 100644 --- a/go.sum +++ b/go.sum @@ -330,8 +330,8 @@ github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c h1:7Uy github.com/ipfs-shipyard/nopfs/ipfs v0.13.2-0.20231027223058-cde3b5ba964c/go.mod h1:6EekK/jo+TynwSE/ZOiOJd4eEvRXoavEC3vquKtv4yI= github.com/ipfs/bbloom v0.0.4 h1:Gi+8EGJ2y5qiD5FbsbpX/TMNcJw8gSqr7eyjHa4Fhvs= github.com/ipfs/bbloom v0.0.4/go.mod h1:cS9YprKXpoZ9lT0n/Mw/a6/aFV6DTjTLYHeA+gyqMG0= -github.com/ipfs/boxo v0.23.1-0.20240914020010-ff77293b4d47 h1:+Lb6B7Y6XASZiaPDn2VkB0y4w2pJWRRv7SDfuIO+Ovs= -github.com/ipfs/boxo v0.23.1-0.20240914020010-ff77293b4d47/go.mod h1:ulu5I6avTmgGmvjuCaBRKwsaOOKjBfQw1EiOOQp8M6E= +github.com/ipfs/boxo v0.23.1-0.20240920193856-639ef65ebcb1 h1:SRl2uyOMbLfo6uVeZ0k4sQt+dJGzyqsjE6GpqD5ouAY= +github.com/ipfs/boxo v0.23.1-0.20240920193856-639ef65ebcb1/go.mod h1:ulu5I6avTmgGmvjuCaBRKwsaOOKjBfQw1EiOOQp8M6E= github.com/ipfs/go-bitfield v1.1.0 h1:fh7FIo8bSwaJEh6DdTWbCeZ1eqOaOkKFI74SCnsWbGA= github.com/ipfs/go-bitfield v1.1.0/go.mod h1:paqf1wjq/D2BBmzfTVFlJQ9IlFOZpg422HL0HqsGWHU= github.com/ipfs/go-bitswap v0.11.0 h1:j1WVvhDX1yhG32NTC9xfxnqycqYIlhzEzLXG/cU1HyQ=