Skip to content

Commit

Permalink
chore: comments on fields, env var updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger authored and radupopa369 committed Sep 12, 2024
1 parent c7954be commit 27f87bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions networks/suzuka/suzuka-config/src/execution_extension.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
use godfig::env_default;
use serde::{Deserialize, Serialize};

/// The execution extension configuration.
/// This covers Suzuka configurations that do not configure the Maptos executor, but do configure the way it is used.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Config {
/// The number of times to retry a block if it fails to execute.
#[serde(default = "default_block_retry_count")]
pub block_retry_count: u64,

/// The amount by which to increment the block timestamp if it fails to execute. (This is the most common reason for a block to fail to execute.)
#[serde(default = "default_block_retry_increment_microseconds")]
pub block_retry_increment_microseconds: u64,
}
Expand All @@ -19,11 +23,11 @@ impl Default for Config {
}
}

env_default!(default_block_retry_count, "BLOCK_RETRY_COUNT", u64, 10);
env_default!(default_block_retry_count, "SUZUKA_BLOCK_RETRY_COUNT", u64, 10);

env_default!(
default_block_retry_increment_microseconds,
"BLOCK_RETRY_INCREMENT_MICROSECONDS",
"SUZUKA_BLOCK_RETRY_INCREMENT_MICROSECONDS",
u64,
5000
);

0 comments on commit 27f87bf

Please sign in to comment.