Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add transaction pool size to Config #9069

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion nearcore/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,10 @@ pub struct Config {
/// Options for syncing state.
#[serde(skip_serializing_if = "Option::is_none")]
pub state_sync: Option<StateSyncConfig>,
/// Limit of the size of per-shard transaction pool measured in bytes. If not set, the size
/// will be unbounded.
#[serde(skip_serializing_if = "Option::is_none")]
pub transaction_pool_size_limit: Option<u64>,
}

fn is_false(value: &bool) -> bool {
Expand Down Expand Up @@ -371,6 +375,7 @@ impl Default for Config {
expected_shutdown: None,
state_sync: None,
state_sync_enabled: None,
transaction_pool_size_limit: None,
}
}
}
Expand Down Expand Up @@ -680,7 +685,7 @@ impl NearConfig {
flat_storage_creation_period: config.store.flat_storage_creation_period,
state_sync_enabled: config.state_sync_enabled.unwrap_or(false),
state_sync: config.state_sync.unwrap_or_default(),
transaction_pool_size_limit: None,
transaction_pool_size_limit: config.transaction_pool_size_limit,
},
network_config: NetworkConfig::new(
config.network,
Expand Down