mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-04 15:58:13 +08:00
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).
This commit is contained in:
parent
d56fe3a026
commit
5e6148bcf4
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user