mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-16 08:10:40 +08:00
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:
@@ -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(),
|
||||
};
|
||||
|
||||
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user