From c2f7225d791b773045e24e964261288c9ee42062 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Fri, 20 Dec 2024 07:03:05 -0800 Subject: [PATCH] fix(fortuna): Adjust max_fee_per_gas to account for priority fee adjustments (#2209) --- apps/fortuna/Cargo.lock | 2 +- apps/fortuna/Cargo.toml | 2 +- apps/fortuna/src/chain/eth_gas_oracle.rs | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/fortuna/Cargo.lock b/apps/fortuna/Cargo.lock index 0708c8be4a..012a660b9a 100644 --- a/apps/fortuna/Cargo.lock +++ b/apps/fortuna/Cargo.lock @@ -1503,7 +1503,7 @@ dependencies = [ [[package]] name = "fortuna" -version = "6.7.1" +version = "6.7.2" dependencies = [ "anyhow", "axum", diff --git a/apps/fortuna/Cargo.toml b/apps/fortuna/Cargo.toml index 22f6b854de..ee9fad45c7 100644 --- a/apps/fortuna/Cargo.toml +++ b/apps/fortuna/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "fortuna" -version = "6.7.1" +version = "6.7.2" edition = "2021" [dependencies] diff --git a/apps/fortuna/src/chain/eth_gas_oracle.rs b/apps/fortuna/src/chain/eth_gas_oracle.rs index 4035f99b0b..4f1d2c9da5 100644 --- a/apps/fortuna/src/chain/eth_gas_oracle.rs +++ b/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)) } }