74 lines
1.7 KiB
Rust
Raw Normal View History

use std::{env, path::PathBuf};
#[must_use]
pub fn slow_test_env() -> bool {
env::var("SLOW_TEST_ENV").is_ok_and(|s| s == "true")
}
#[must_use]
pub fn debug_tracing() -> bool {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_TESTS_TRACING").is_ok_and(|val| val.eq_ignore_ascii_case("true"))
}
#[must_use]
pub fn nomos_log_dir() -> Option<PathBuf> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_LOG_DIR").ok().map(PathBuf::from)
}
#[must_use]
pub fn nomos_log_level() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_LOG_LEVEL").ok()
}
#[must_use]
pub fn nomos_log_filter() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_LOG_FILTER").ok()
}
#[must_use]
pub fn nomos_use_autonat() -> bool {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_USE_AUTONAT").is_ok()
}
#[must_use]
pub fn nomos_cfgsync_port() -> Option<u16> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_CFGSYNC_PORT")
.ok()
.and_then(|v| v.parse::<u16>().ok())
}
#[must_use]
pub fn nomos_tests_keep_logs() -> bool {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_TESTS_KEEP_LOGS").is_ok()
}
#[must_use]
pub fn nomos_testnet_image() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_TESTNET_IMAGE").ok()
}
#[must_use]
pub fn nomos_testnet_image_pull_policy() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_TESTNET_IMAGE_PULL_POLICY").ok()
}
#[must_use]
pub fn rust_log() -> Option<String> {
env::var("RUST_LOG").ok()
}
#[must_use]
chore: merge dev into master (#29) * Add node config overrides (#14) * chore: merge master into dev and update configs after merge (#17) * Sdp config structs from logos blockchain (#15) * Update configs after main repo merge --------- Co-authored-by: gusto <bacv@users.noreply.github.com> * Local deployer allows to stop and restart nodes (#16) * Unify local node control and restart support * Add local stop-node support * Use node names for restart/stop control * merge --------- Co-authored-by: hansieodendaal <hansie.odendaal@gmail.com> * Add orphan manual cluster test utilities * Update node rev and align consensus/wallet config * Update node rev and align wallet/KMS configs * Update main repo ref (#23) * Fix genesis utxos and scale leader stake * Document leader stake constants * feat: add custom persistent dir option for working files (#26) * chore: config and naming updates (#27) * Update config and crate naming - Updated configs to the lates main repo configs. - Updated all main repo crate namings to be same as the main repo. - Added `create_dir_all` to `pub(crate) fn create_tempdir(custom_work_dir: Option<PathBuf>) -> std::io::Result<TempDir> {`. - Wired in optional `persist_dir` when using the local deployer. - Update `time` vulnerability **Note:** Unsure about the `service_params` mapping in `pub(crate) fn cryptarchia_deployment(config: &GeneralConfig) -> CryptarchiaDeploymentSettings {` * fix ntp server config --------- Co-authored-by: Andrus Salumets <andrus@status.im> Co-authored-by: gusto <bacv@users.noreply.github.com> Co-authored-by: andrussal <salumets.andrus@gmail.com>
2026-02-09 14:12:26 +02:00
pub fn lb_time_service_backend() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_TIME_BACKEND").ok()
}
#[must_use]
pub fn nomos_otlp_endpoint() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_OTLP_ENDPOINT").ok()
}
#[must_use]
pub fn nomos_otlp_metrics_endpoint() -> Option<String> {
2026-01-26 16:36:51 +01:00
env::var("LOGOS_BLOCKCHAIN_OTLP_METRICS_ENDPOINT").ok()
}