From 5e6148bcf4358f6b9bc8afc26fcbfe9364ea1418 Mon Sep 17 00:00:00 2001 From: Marcin Rataj Date: Fri, 14 Nov 2025 00:12:27 +0100 Subject: [PATCH] fix(add): respect Provide config in fast-provide-root fast-provide-root should honor the same config settings as the regular provide system: - skip when Provide.Enabled is false - skip when Provide.DHT.Interval is 0 - respect Provide.Strategy (all/pinned/roots/mfs/combinations) This ensures fast-provide only runs when appropriate based on user configuration and the nature of the content being added (pinned vs unpinned, added to MFS or not). --- core/commands/add.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/commands/add.go b/core/commands/add.go index 75fb184b7..2eb18a2e7 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -620,9 +620,11 @@ https://github.com/ipfs/kubo/blob/master/docs/config.md#import // For combined strategies (pinned+mfs), check each component if strategy&config.ProvideStrategyPinned != 0 && dopin { shouldProvide = true - } else if strategy&config.ProvideStrategyRoots != 0 && dopin { + } + if strategy&config.ProvideStrategyRoots != 0 && dopin { shouldProvide = true - } else if strategy&config.ProvideStrategyMFS != 0 && toFilesSet { + } + if strategy&config.ProvideStrategyMFS != 0 && toFilesSet { shouldProvide = true } }