File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,9 @@ impl ClientBuilder {
153
153
aggregator_client,
154
154
#[ cfg( feature = "fs" ) ]
155
155
snapshot_downloader,
156
+ #[ cfg( feature = "fs" ) ]
156
157
feedback_sender,
158
+ #[ cfg( feature = "fs" ) ]
157
159
logger,
158
160
) ) ;
159
161
Original file line number Diff line number Diff line change 1
1
use anyhow:: Context ;
2
+ #[ cfg( feature = "fs" ) ]
2
3
use mithril_common:: digesters:: { CardanoImmutableDigester , ImmutableDigester } ;
3
4
use mithril_common:: entities:: { ProtocolMessage , ProtocolMessagePartKey } ;
4
5
use mithril_common:: messages:: SignerWithStakeMessagePart ;
5
6
use mithril_common:: protocol:: SignerBuilder ;
6
7
use slog:: { o, Logger } ;
8
+ #[ cfg( feature = "fs" ) ]
7
9
use std:: path:: Path ;
10
+ #[ cfg( feature = "fs" ) ]
8
11
use std:: sync:: Arc ;
9
12
10
- use crate :: { MithrilCertificate , MithrilResult , MithrilStakeDistribution } ;
13
+ #[ cfg( feature = "fs" ) ]
14
+ use crate :: MithrilCertificate ;
15
+ use crate :: { MithrilResult , MithrilStakeDistribution } ;
11
16
12
17
/// A [MessageBuilder] can be used to compute the message of Mithril artifacts.
13
18
pub struct MessageBuilder {
19
+ #[ cfg( feature = "fs" ) ]
14
20
immutable_digester : Option < Arc < dyn ImmutableDigester > > ,
15
21
logger : Logger ,
16
22
}
@@ -20,6 +26,7 @@ impl MessageBuilder {
20
26
pub fn new ( ) -> MessageBuilder {
21
27
let logger = Logger :: root ( slog:: Discard , o ! ( ) ) ;
22
28
Self {
29
+ #[ cfg( feature = "fs" ) ]
23
30
immutable_digester : None ,
24
31
logger,
25
32
}
Original file line number Diff line number Diff line change 64
64
//! ```
65
65
66
66
use anyhow:: Context ;
67
+ #[ cfg( feature = "fs" ) ]
67
68
use slog:: Logger ;
68
69
use std:: sync:: Arc ;
69
70
use thiserror:: Error ;
70
71
71
72
use crate :: aggregator_client:: { AggregatorClient , AggregatorClientError , AggregatorRequest } ;
73
+ #[ cfg( feature = "fs" ) ]
72
74
use crate :: feedback:: FeedbackSender ;
73
75
#[ cfg( feature = "fs" ) ]
74
76
use crate :: snapshot_downloader:: SnapshotDownloader ;
@@ -93,7 +95,9 @@ pub struct SnapshotClient {
93
95
aggregator_client : Arc < dyn AggregatorClient > ,
94
96
#[ cfg( feature = "fs" ) ]
95
97
snapshot_downloader : Arc < dyn SnapshotDownloader > ,
98
+ #[ cfg( feature = "fs" ) ]
96
99
feedback_sender : FeedbackSender ,
100
+ #[ cfg( feature = "fs" ) ]
97
101
logger : Logger ,
98
102
}
99
103
@@ -102,14 +106,16 @@ impl SnapshotClient {
102
106
pub fn new (
103
107
aggregator_client : Arc < dyn AggregatorClient > ,
104
108
#[ cfg( feature = "fs" ) ] snapshot_downloader : Arc < dyn SnapshotDownloader > ,
105
- feedback_sender : FeedbackSender ,
106
- logger : Logger ,
109
+ # [ cfg ( feature = "fs" ) ] feedback_sender : FeedbackSender ,
110
+ # [ cfg ( feature = "fs" ) ] logger : Logger ,
107
111
) -> Self {
108
112
Self {
109
113
aggregator_client,
110
114
#[ cfg( feature = "fs" ) ]
111
115
snapshot_downloader,
116
+ #[ cfg( feature = "fs" ) ]
112
117
feedback_sender,
118
+ #[ cfg( feature = "fs" ) ]
113
119
logger,
114
120
}
115
121
}
You can’t perform that action at this time.
0 commit comments