Skip to content

Commit

Permalink
fix: erroneous AutoMineMaxFeeTooLow
Browse files Browse the repository at this point in the history
  • Loading branch information
Wodann committed Dec 6, 2023
1 parent fd8ce51 commit c50a9d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
4 changes: 2 additions & 2 deletions crates/edr_eth/src/transaction/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ impl SignedTransaction {
SignedTransaction::PreEip155Legacy(_)
| SignedTransaction::PostEip155Legacy(_)
| SignedTransaction::Eip2930(_) => None,
SignedTransaction::Eip1559(tx) => Some(tx.max_priority_fee_per_gas),
SignedTransaction::Eip4844(tx) => Some(tx.max_priority_fee_per_gas),
SignedTransaction::Eip1559(tx) => Some(tx.max_fee_per_gas),
SignedTransaction::Eip4844(tx) => Some(tx.max_fee_per_gas),
}
}

Expand Down
11 changes: 1 addition & 10 deletions crates/edr_provider/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ impl ProviderData {
filter_id
}

/// Calculates the next block's base fee per gas.
pub fn next_block_base_fee_per_gas(&self) -> Result<Option<U256>, BlockchainError> {
if self.spec_id() < SpecId::LONDON {
return Ok(None);
Expand Down Expand Up @@ -626,16 +627,6 @@ impl ProviderData {
&mut self,
transaction_request: TransactionRequestAndSender,
) -> Result<B256, ProviderError> {
if let Some(chain_id) = transaction_request.request.chain_id() {
let expected = self.chain_id();
if chain_id != expected {
return Err(ProviderError::InvalidChainId {
expected,
actual: chain_id,
});
}
}

let signed_transaction = if self.is_auto_mining {
let sender = transaction_request.sender;
self.validate_auto_mine_transaction(
Expand Down

0 comments on commit c50a9d7

Please sign in to comment.