Skip to content

Commit 134e15e

Browse files
committed
fix: populate MPFPG from tx request in 1559 transactions
1 parent 6e2d337 commit 134e15e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/evm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@ where
18011801
pub fn estimate_gas(mut self) -> Result<(crate::EstimationResult, Self), EvmErrored<Db, Insp>> {
18021802
use tracing::{debug, enabled};
18031803

1804-
if let Some(est) = crate::trevm_try!(self.estimate_gas_simple_transfer(), self) {
1804+
if let Some(est) = trevm_try!(self.estimate_gas_simple_transfer(), self) {
18051805
return Ok((crate::EstimationResult::basic_transfer_success(est), self));
18061806
}
18071807

src/fill/alloy.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,12 @@ impl Tx for alloy::rpc::types::TransactionRequest {
327327
// intend that to mean "as much as possible"
328328
*tx_type = self.transaction_type.unwrap_or(TxType::Eip1559 as u8);
329329
*gas_limit = self.gas.unwrap_or(u64::MAX);
330-
*gas_price = self.gas_price.unwrap_or_default();
330+
*gas_price =
331+
self.gas_price.unwrap_or_default().max(self.max_fee_per_gas.unwrap_or_default());
331332
*kind = self.to.unwrap_or_default();
332333
*value = self.value.unwrap_or_default();
333334
*data = self.input.input().cloned().unwrap_or_default();
334-
*nonce = self.nonce.unwrap_or_default(); // TODO: IS THIS CORRECT?
335+
*nonce = self.nonce.unwrap_or_default();
335336
*chain_id = self.chain_id;
336337
*access_list = self.access_list.clone().unwrap_or_default();
337338
*gas_priority_fee = self.max_priority_fee_per_gas;

0 commit comments

Comments
 (0)