Skip to content

Commit adfed6f

Browse files
committed
feat(aggregator): activate DMQ
1 parent 28da964 commit adfed6f

File tree

4 files changed

+2
-15
lines changed

4 files changed

+2
-15
lines changed

mithril-aggregator/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ license = { workspace = true }
1010
repository = { workspace = true }
1111

1212
[features]
13-
default = ["jemallocator", "future_dmq"]
13+
default = ["jemallocator"]
1414

1515
bundle_tls = ["reqwest/native-tls-vendored"]
1616
jemallocator = ["dep:tikv-jemallocator"]
17-
future_dmq = ["dep:mithril-dmq"]
1817

1918
[dependencies]
2019
anyhow = { workspace = true }
@@ -31,7 +30,7 @@ mithril-cardano-node-chain = { path = "../internal/cardano-node/mithril-cardano-
3130
mithril-cardano-node-internal-database = { path = "../internal/cardano-node/mithril-cardano-node-internal-database" }
3231
mithril-cli-helper = { path = "../internal/mithril-cli-helper" }
3332
mithril-common = { path = "../mithril-common" }
34-
mithril-dmq = { path = "../internal/mithril-dmq", optional = true }
33+
mithril-dmq = { path = "../internal/mithril-dmq" }
3534
mithril-doc = { path = "../internal/mithril-doc" }
3635
mithril-era = { path = "../internal/mithril-era" }
3736
mithril-metric = { path = "../internal/mithril-metric" }

mithril-aggregator/src/configuration.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use mithril_common::entities::{
1515
SignedEntityTypeDiscriminants,
1616
};
1717
use mithril_common::{AggregateSignatureType, CardanoNetwork, StdResult};
18-
#[cfg(feature = "future_dmq")]
1918
use mithril_dmq::DmqNetwork;
2019
use mithril_doc::{Documenter, DocumenterDefault, StructDoc};
2120
use mithril_era::adapters::EraReaderAdapterType;
@@ -98,7 +97,6 @@ pub trait ConfigurationSource {
9897
/// DMQ Network Magic number
9998
///
10099
/// useful for TestNet & DevNet
101-
#[cfg(feature = "future_dmq")]
102100
fn dmq_network_magic(&self) -> Option<u64> {
103101
panic!("dmq_network_magic is not implemented.");
104102
}
@@ -319,7 +317,6 @@ pub trait ConfigurationSource {
319317
}
320318

321319
/// Get a representation of the DMQ network.
322-
#[cfg(feature = "future_dmq")]
323320
fn get_dmq_network(&self) -> StdResult<DmqNetwork> {
324321
DmqNetwork::from_code(self.network(), self.dmq_network_magic())
325322
.with_context(|| "Invalid DMQ network configuration")
@@ -793,7 +790,6 @@ impl ConfigurationSource for ServeCommandConfiguration {
793790
self.network_magic
794791
}
795792

796-
#[cfg(feature = "future_dmq")]
797793
fn dmq_network_magic(&self) -> Option<u64> {
798794
self.dmq_network_magic
799795
}

mithril-aggregator/src/dependency_injection/builder/enablers/misc.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,13 @@ use std::time::Duration;
1010

1111
use mithril_aggregator_client::AggregatorHttpClient;
1212
use mithril_common::logging::LoggerExtensions;
13-
#[cfg(feature = "future_dmq")]
1413
use mithril_common::messages::RegisterSignatureMessageDmq;
15-
#[cfg(feature = "future_dmq")]
1614
use mithril_dmq::DmqConsumerClientPallas;
1715
use mithril_signed_entity_lock::SignedEntityTypeLock;
1816

1917
use crate::database::repository::CertificateRepository;
2018
use crate::dependency_injection::{DependenciesBuilder, Result};
2119
use crate::get_dependency;
22-
#[cfg(feature = "future_dmq")]
2320
use crate::services::SignatureConsumerDmq;
2421
use crate::services::{
2522
MessageService, MithrilMessageService, SequentialSignatureProcessor, SignatureConsumer,
@@ -85,7 +82,6 @@ impl DependenciesBuilder {
8582

8683
/// Builds a [SignatureConsumer]
8784
pub async fn build_signature_consumer(&mut self) -> Result<Arc<dyn SignatureConsumer>> {
88-
#[cfg(feature = "future_dmq")]
8985
let signature_consumer = match self.configuration.dmq_node_socket_path() {
9086
Some(dmq_node_socket_path) => {
9187
let dmq_consumer =
@@ -98,8 +94,6 @@ impl DependenciesBuilder {
9894
}
9995
_ => Arc::new(SignatureConsumerNoop) as Arc<dyn SignatureConsumer>,
10096
};
101-
#[cfg(not(feature = "future_dmq"))]
102-
let signature_consumer = Arc::new(SignatureConsumerNoop) as Arc<dyn SignatureConsumer>;
10397

10498
Ok(signature_consumer)
10599
}

mithril-aggregator/src/services/signature_consumer/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
#[cfg(feature = "future_dmq")]
21
mod dmq;
32
mod fake;
43
mod interface;
54
mod noop;
65

7-
#[cfg(feature = "future_dmq")]
86
pub use dmq::*;
97
pub use fake::*;
108
pub use interface::*;

0 commit comments

Comments
 (0)