From fc6f401fbb5e6c9eccf7732575a76ba3e4e8e04c Mon Sep 17 00:00:00 2001 From: Milosz Muszynski Date: Wed, 18 Dec 2024 11:38:17 +0100 Subject: [PATCH] rusk: added configurability for min_deploy_points --- rusk/default.config.toml | 1 + rusk/src/bin/config/chain.rs | 5 +++++ rusk/src/bin/main.rs | 1 + 3 files changed, 7 insertions(+) diff --git a/rusk/default.config.toml b/rusk/default.config.toml index 71d023a9b0..830c4d38b3 100644 --- a/rusk/default.config.toml +++ b/rusk/default.config.toml @@ -26,6 +26,7 @@ #gas_per_deploy_byte = 100 #min_deployment_gas_price = 2000 #min_gas_limit = 75000 +#min_deploy_points = 5000000 [databroker] max_inv_entries = 100 diff --git a/rusk/src/bin/config/chain.rs b/rusk/src/bin/config/chain.rs index d429897a81..1e69ac6175 100644 --- a/rusk/src/bin/config/chain.rs +++ b/rusk/src/bin/config/chain.rs @@ -32,6 +32,7 @@ pub(crate) struct ChainConfig { // forking the chain. gas_per_deploy_byte: Option, min_deployment_gas_price: Option, + min_deploy_points: Option, min_gas_limit: Option, block_gas_limit: Option, @@ -93,6 +94,10 @@ impl ChainConfig { self.min_deployment_gas_price } + pub(crate) fn min_deploy_points(&self) -> Option { + self.min_deploy_points + } + pub(crate) fn min_gas_limit(&self) -> Option { self.min_gas_limit } diff --git a/rusk/src/bin/main.rs b/rusk/src/bin/main.rs index 666879a197..bc4780ae0e 100644 --- a/rusk/src/bin/main.rs +++ b/rusk/src/bin/main.rs @@ -85,6 +85,7 @@ async fn main() -> Result<(), Box> { .with_min_deployment_gas_price( config.chain.min_deployment_gas_price(), ) + .with_min_deploy_points(config.chain.min_deploy_points()) .with_min_gas_limit(config.chain.min_gas_limit()) .with_block_gas_limit(config.chain.block_gas_limit()); };