Skip to content

Commit e1e0802

Browse files
committed
chore(aggregator): deprecate config field in dependency container
As the unvalidated `Configuration` structure should only be used by the dependency builder when it's keys can be safely validated, else unvalidated keys would have to be validated in the middle of the application execution.
1 parent 00a43fc commit e1e0802

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

mithril-aggregator/src/dependency_injection/builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,7 @@ impl DependenciesBuilder {
14081408

14091409
/// Return an unconfigured [DependencyContainer]
14101410
pub async fn build_dependency_container(&mut self) -> Result<DependencyContainer> {
1411+
#[allow(deprecated)]
14111412
let dependency_manager = DependencyContainer {
14121413
config: self.configuration.clone(),
14131414
root_logger: self.root_logger(),

mithril-aggregator/src/dependency_injection/containers.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ pub type EpochServiceWrapper = Arc<RwLock<dyn EpochService>>;
5050
/// DependencyManager handles the dependencies
5151
pub struct DependencyContainer {
5252
/// Configuration structure.
53+
// TODO: remove this field and only use the `Configuration` in the dependencies builder
54+
#[deprecated]
5355
pub config: Configuration,
5456

5557
/// Application root logger
@@ -206,6 +208,7 @@ impl DependencyContainer {
206208
self.epoch_settings_storer
207209
.save_epoch_settings(
208210
*epoch,
211+
#[allow(deprecated)]
209212
AggregatorEpochSettings {
210213
protocol_parameters: fixture.protocol_parameters(),
211214
cardano_transactions_signing_config: self

0 commit comments

Comments
 (0)