pub fn effective_source(
config_path: Option<&Path>,
default: impl FnOnce() -> Option<PathBuf>,
) -> Result<Option<PathBuf>>Expand description
Resolve the config source actually consulted. When --config is omitted,
the default path is auto-loaded only if present, so report the file that
resolve_config will actually read — not just the explicit flag.
Uses try_exists rather than exists: a permission error on the default
path must be surfaced, not silently reported as “no config file” — the
whole point of validate is telling the operator what the node sees.