Skip to content

Commit 7ade95e

Browse files
wetkeyboardmattsse
andauthored
chore(consensus): update GasLimitInvalidIncrease/GasLimitInvalidDecrease error msg (#18561)
Co-authored-by: Matthias Seitz <[email protected]>
1 parent 4d9d712 commit 7ade95e

File tree

1 file changed

+3
-3
lines changed
  • crates/consensus/consensus/src

1 file changed

+3
-3
lines changed

crates/consensus/consensus/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use alloy_consensus::Header;
1616
use alloy_primitives::{BlockHash, BlockNumber, Bloom, B256};
1717
use reth_execution_types::BlockExecutionResult;
1818
use reth_primitives_traits::{
19-
constants::{MAXIMUM_GAS_LIMIT_BLOCK, MINIMUM_GAS_LIMIT},
19+
constants::{GAS_LIMIT_BOUND_DIVISOR, MAXIMUM_GAS_LIMIT_BLOCK, MINIMUM_GAS_LIMIT},
2020
transaction::error::InvalidTransactionError,
2121
Block, GotExpected, GotExpectedBoxed, NodePrimitives, RecoveredBlock, SealedBlock,
2222
SealedHeader,
@@ -349,7 +349,7 @@ pub enum ConsensusError {
349349
},
350350

351351
/// Error when the child gas limit exceeds the maximum allowed increase.
352-
#[error("child gas_limit {child_gas_limit} max increase is {parent_gas_limit}/1024")]
352+
#[error("child gas_limit {child_gas_limit} exceeds the max allowed increase ({parent_gas_limit}/{GAS_LIMIT_BOUND_DIVISOR})")]
353353
GasLimitInvalidIncrease {
354354
/// The parent gas limit.
355355
parent_gas_limit: u64,
@@ -378,7 +378,7 @@ pub enum ConsensusError {
378378
},
379379

380380
/// Error when the child gas limit exceeds the maximum allowed decrease.
381-
#[error("child gas_limit {child_gas_limit} max decrease is {parent_gas_limit}/1024")]
381+
#[error("child gas_limit {child_gas_limit} is below the max allowed decrease ({parent_gas_limit}/{GAS_LIMIT_BOUND_DIVISOR})")]
382382
GasLimitInvalidDecrease {
383383
/// The parent gas limit.
384384
parent_gas_limit: u64,

0 commit comments

Comments
 (0)