node: Remove `radicle_fetch::Config` from `worker::Config`

The configuration options are now passed through to the worker, and
are no longer needed to initialise.
This commit is contained in:
Fintan Halpenny 2026-03-24 09:44:42 +00:00
parent 07f3d56559
commit ef4ddf06c3
2 changed files with 1 additions and 11 deletions

View File

@ -235,10 +235,6 @@ impl Runtime {
let nid = *signer.public_key();
let fetch = worker::FetchConfig {
config: radicle_fetch::Config {
limit: radicle_fetch::FetchLimit::default(),
level_min: config.fetch.feature_level_min(),
},
local: nid,
expiry: worker::garbage::Expiry::default(),
};

View File

@ -59,8 +59,6 @@ pub struct TaskResult {
#[derive(Debug, Clone)]
pub struct FetchConfig {
/// Configuration passed to the fetch protocol.
pub config: radicle_fetch::Config,
/// Public key of the local peer.
pub local: crypto::PublicKey,
/// Configuration for `git gc` garbage collection. Defaults to `1
@ -243,11 +241,7 @@ impl Worker {
channels: channels::ChannelsFlush,
notifs: notifications::StoreWriter,
) -> Result<fetch::FetchResult, FetchError> {
let FetchConfig {
config: _,
local,
expiry,
} = &self.fetch_config;
let FetchConfig { local, expiry } = &self.fetch_config;
// N.b. if the `rid` is blocked this will return an error, so
// we won't continue with any further set up of the fetch.
let allowed = radicle_fetch::Allowed::from_config(rid, &self.policies)?;