Skip to content

Commit

Permalink
fix: some default value fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
allnil committed Oct 23, 2024
1 parent 2eb0421 commit 9d9b9d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/node/core/src/args/txpool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ pub struct TxPoolArgs {
#[arg(long = "txpool.pricebump", default_value_t = DEFAULT_PRICE_BUMP)]
pub price_bump: u128,

// WVM: 500_000
/// Minimum base fee required by the protocol.
#[arg(long = "txpool.minimal-protocol-fee", default_value_t = MIN_PROTOCOL_BASE_FEE.load(SeqCst))]
#[arg(long = "txpool.minimal-protocol-fee", default_value_t = 500_000)]
pub minimal_protocol_basefee: u64,

/// The default enforced gas limit for transactions entering the pool
Expand Down
4 changes: 2 additions & 2 deletions crates/primitives-traits/src/constants/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ pub(crate) static WVM_FEE_MANAGER: LazyLock<Arc<WvmFeeManager>> = LazyLock::new(
raw_calculate_lowest_possible_gas_price(original_price, *ETHEREUM_BLOCK_GAS_LIMIT);
let mut to_wei = lowest_possible_gas_price_in_gwei * 1e9;
// WVM: minimum fee check
if to_wei < 500_000f64 {
to_wei = 500_000f64 ;
if to_wei < 500_000f64 {
to_wei = 500_000f64;
}
MIN_PROTOCOL_BASE_FEE.store(to_wei as u64, SeqCst);
Ok(())
Expand Down

0 comments on commit 9d9b9d6

Please sign in to comment.