Skip to content

Commit

Permalink
rusk: added configurability for min_deploy_points
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszm committed Dec 18, 2024
1 parent a090479 commit fc6f401
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions rusk/default.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions rusk/src/bin/config/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ pub(crate) struct ChainConfig {
// forking the chain.
gas_per_deploy_byte: Option<u64>,
min_deployment_gas_price: Option<u64>,
min_deploy_points: Option<u64>,
min_gas_limit: Option<u64>,
block_gas_limit: Option<u64>,

Expand Down Expand Up @@ -93,6 +94,10 @@ impl ChainConfig {
self.min_deployment_gas_price
}

pub(crate) fn min_deploy_points(&self) -> Option<u64> {
self.min_deploy_points
}

pub(crate) fn min_gas_limit(&self) -> Option<u64> {
self.min_gas_limit
}
Expand Down
1 change: 1 addition & 0 deletions rusk/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
.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());
};
Expand Down

0 comments on commit fc6f401

Please sign in to comment.