fix(commands/reprovide): update manual reprovide error message (#11151)
Reprovide Sweep is now the default behaviour since v0.39.0. Update manual reprovide error message to reflect this change.
Guillaume Michel committed
Jan 21, 2026 at 05:59 UTC
8848b537cf472fe0f032bc3d1f453785e574afbd
1 file changed
+3
-2
core/commands/routing.go
+3
-2
@@ -17,6 +17,7 @@ import (
17
18
dag "github.com/ipfs/boxo/ipld/merkledag"
19
"github.com/ipfs/boxo/ipns"
20
+ "github.com/ipfs/boxo/provider"
21
cid "github.com/ipfs/go-cid"
22
cmds "github.com/ipfs/go-ipfs-cmds"
23
ipld "github.com/ipfs/go-ipld-format"
@@ -296,9 +297,9 @@ Trigger reprovider to announce our data to network.
297
if cfg.Provide.DHT.Interval.WithDefault(config.DefaultProvideDHTInterval) == 0 {
298
return errors.New("invalid configuration: Provide.DHT.Interval is set to '0'")
299
}
299
- provideSys, ok := nd.Provider.(*node.LegacyProvider)
300
+ provideSys, ok := nd.Provider.(provider.Reprovider)
301
if !ok {
301
- return errors.New("manual reprovide not available with experimental sweeping provider (Provide.DHT.SweepEnabled=true)")
302
+ return errors.New("manual reprovide only available with legacy provider (Provide.DHT.SweepEnabled=false)")
303
}
304
305
err = provideSys.Reprovide(req.Context)