Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
node: Remove `radicle_fetch::Config` from `worker::Config`
Fintan Halpenny committed 1 month ago
commit ef4ddf06c3d1fb5dd878f6ccdc5a8d3eebecbc37
parent 07f3d56
2 files changed +1 -11
modified crates/radicle-node/src/runtime.rs
@@ -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(),
        };
modified crates/radicle-node/src/worker.rs
@@ -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)?;