Переглянути джерело

fix(fortuna): Adjust max_fee_per_gas to account for priority fee adjustments (#2209)

Jayant Krishnamurthy 11 місяців тому
батько
коміт
c2f7225d79

+ 1 - 1
apps/fortuna/Cargo.lock

@@ -1503,7 +1503,7 @@ dependencies = [
 
 [[package]]
 name = "fortuna"
-version = "6.7.1"
+version = "6.7.2"
 dependencies = [
  "anyhow",
  "axum",

+ 1 - 1
apps/fortuna/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "fortuna"
-version = "6.7.1"
+version = "6.7.2"
 edition = "2021"
 
 [dependencies]

+ 2 - 0
apps/fortuna/src/chain/eth_gas_oracle.rs

@@ -77,6 +77,8 @@ where
             .and_then(|x| x.checked_div(U256::from(100)))
             .unwrap_or(max_priority_fee_per_gas);
 
+        let max_fee_per_gas = std::cmp::max(max_fee_per_gas, max_priority_fee_per_gas);
+
         Ok((max_fee_per_gas, max_priority_fee_per_gas))
     }
 }