Skip to content

Commit 917090b

Browse files
author
Ludo Galabru
committed
feat: add options for logs
1 parent 3485e6f commit 917090b

File tree

1 file changed

+21
-0
lines changed
  • components/hord-cli/src/config

1 file changed

+21
-0
lines changed

components/hord-cli/src/config/mod.rs

+21
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ pub struct Config {
3030
pub event_sources: Vec<EventSourceConfig>,
3131
pub limits: LimitsConfig,
3232
pub network: IndexerConfig,
33+
pub logs: LogConfig,
34+
}
35+
36+
#[derive(Clone, Debug)]
37+
pub struct LogConfig {
38+
pub ordinals_computation: bool,
3339
}
3440

3541
#[derive(Clone, Debug)]
@@ -223,6 +229,12 @@ impl Config {
223229
stacks_network,
224230
bitcoin_network,
225231
},
232+
logs: LogConfig {
233+
ordinals_computation: config_file
234+
.logs
235+
.and_then(|l| l.ordinals_computation)
236+
.unwrap_or(true),
237+
},
226238
};
227239
Ok(config)
228240
}
@@ -350,6 +362,9 @@ impl Config {
350362
stacks_network: StacksNetwork::Devnet,
351363
bitcoin_network: BitcoinNetwork::Regtest,
352364
},
365+
logs: LogConfig {
366+
ordinals_computation: true,
367+
},
353368
}
354369
}
355370

@@ -379,6 +394,9 @@ impl Config {
379394
stacks_network: StacksNetwork::Testnet,
380395
bitcoin_network: BitcoinNetwork::Testnet,
381396
},
397+
logs: LogConfig {
398+
ordinals_computation: true,
399+
},
382400
}
383401
}
384402

@@ -410,6 +428,9 @@ impl Config {
410428
stacks_network: StacksNetwork::Mainnet,
411429
bitcoin_network: BitcoinNetwork::Mainnet,
412430
},
431+
logs: LogConfig {
432+
ordinals_computation: false,
433+
},
413434
}
414435
}
415436
}

0 commit comments

Comments
 (0)