Skip to content

Commit bb022a9

Browse files
authored
fix(fortuna): Fix gas padding bug caused by refactor
Add in the calculation of the padded gas limit. I dropped this padding value during the refactor. This is probably responsible for the current set of gas estimation issues.
1 parent a58ba36 commit bb022a9

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apps/fortuna/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/fortuna/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "fortuna"
3-
version = "7.4.7"
3+
version = "7.4.8"
44
edition = "2021"
55

66
[lib]

apps/fortuna/src/eth_utils/utils.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ pub async fn submit_tx_with_backoff<T: Middleware + NonceManaged + 'static>(
166166

167167
let num_retries = Arc::new(AtomicU64::new(0));
168168

169+
let padded_gas_limit = U256::from(escalation_policy.gas_limit_tolerance_pct) * gas_limit / 100;
170+
169171
let success = backoff::future::retry_notify(
170172
backoff,
171173
|| async {
@@ -176,7 +178,7 @@ pub async fn submit_tx_with_backoff<T: Middleware + NonceManaged + 'static>(
176178
submit_tx(
177179
middleware.clone(),
178180
&call,
179-
gas_limit,
181+
padded_gas_limit,
180182
gas_multiplier_pct,
181183
fee_multiplier_pct,
182184
)

0 commit comments

Comments
 (0)