kabu_node_actor_config/
lib.rs1#[derive(Debug, Clone)]
2pub struct NodeBlockActorConfig {
3 pub block_header: bool,
4 pub block_with_tx: bool,
5 pub block_logs: bool,
6 pub block_state_update: bool,
7}
8
9impl NodeBlockActorConfig {
10 pub fn all_disabled() -> Self {
11 Self { block_header: false, block_with_tx: false, block_logs: false, block_state_update: false }
12 }
13
14 pub fn all_enabled() -> Self {
15 Self { block_header: true, block_with_tx: true, block_logs: true, block_state_update: true }
16 }
17
18 pub fn with_block_header(mut self) -> Self {
19 self.block_header = true;
20 self
21 }
22
23 pub fn with_block_with_tx(mut self) -> Self {
24 self.block_with_tx = true;
25 self
26 }
27
28 pub fn with_block_logs(mut self) -> Self {
29 self.block_logs = true;
30 self
31 }
32
33 pub fn with_block_state_update(mut self) -> Self {
34 self.block_state_update = true;
35 self
36 }
37}