-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy pathservice.rs
More file actions
62 lines (59 loc) · 1.85 KB
/
Copy pathservice.rs
File metadata and controls
62 lines (59 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
pub use crate::{
block_producer_effectful::{
vrf_evaluator_effectful::BlockProducerVrfEvaluatorService, BlockProducerService,
},
event_source::EventSourceService,
external_snark_worker_effectful::ExternalSnarkWorkerService,
ledger::LedgerService,
p2p::service::*,
recorder::Recorder,
rpc_effectful::RpcService,
snark::{
block_verify_effectful::SnarkBlockVerifyService,
work_verify_effectful::SnarkWorkVerifyService,
},
snark_pool::SnarkPoolService,
transition_frontier::{
archive::archive_service::ArchiveService,
genesis_effectful::TransitionFrontierGenesisService,
sync::ledger::snarked::TransitionFrontierSyncLedgerSnarkedService,
},
};
pub use mina_snark::user_command_verify_effectful::SnarkUserCommandVerifyService;
pub use redux::TimeService;
use crate::stats::Stats;
pub trait Service:
TimeService
+ EventSourceService
+ SnarkBlockVerifyService
+ SnarkWorkVerifyService
+ P2pService
+ LedgerService
+ TransitionFrontierGenesisService
+ TransitionFrontierSyncLedgerSnarkedService
+ SnarkPoolService
+ SnarkUserCommandVerifyService
+ BlockProducerVrfEvaluatorService
+ BlockProducerService
+ ExternalSnarkWorkerService
+ RpcService
+ ArchiveService
{
fn queues(&mut self) -> Queues;
fn stats(&mut self) -> Option<&mut Stats>;
fn recorder(&mut self) -> &mut Recorder;
fn is_replay(&self) -> bool;
}
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[cfg_attr(feature = "openapi", derive(utoipa::ToSchema))]
pub struct Queues {
pub events: usize,
pub snark_block_verify: usize,
pub ledger: usize,
pub vrf_evaluator: Option<usize>,
pub block_prover: Option<usize>,
pub p2p_webrtc: usize,
#[cfg(feature = "p2p-libp2p")]
pub p2p_libp2p: usize,
pub rpc: usize,
}