diff --git a/bitswap/client/client.go b/bitswap/client/client.go index f1308793d7..aa9ab78fa7 100644 --- a/bitswap/client/client.go +++ b/bitswap/client/client.go @@ -175,7 +175,7 @@ func New(parent context.Context, network bsnet.BitSwapNetwork, bstore blockstore dupMetric: bmetrics.DupHist(ctx), allMetric: bmetrics.AllHist(ctx), provSearchDelay: defaults.ProvSearchDelay, - rebroadcastDelay: delay.Fixed(time.Minute), + rebroadcastDelay: delay.Fixed(defaults.RebroadcastDelay), simulateDontHavesOnTimeout: true, } diff --git a/bitswap/internal/defaults/defaults.go b/bitswap/internal/defaults/defaults.go index c7ac566f5e..f13690a522 100644 --- a/bitswap/internal/defaults/defaults.go +++ b/bitswap/internal/defaults/defaults.go @@ -3,8 +3,6 @@ package defaults import ( "encoding/binary" "time" - - delay "github.com/ipfs/go-ipfs-delay" ) const ( @@ -35,10 +33,10 @@ const ( // FIXME: expose this in go-verifcid. MaximumHashLength = 128 MaximumAllowedCid = binary.MaxVarintLen64*4 + MaximumHashLength -) -var ( // RebroadcastDelay is the default delay to trigger broadcast of // random CIDs in the wantlist. - RebroadcastDelay = delay.Fixed(time.Minute) + RebroadcastDelay = time.Minute ) + +var ()