Skip to content

Commit 0b523fb

Browse files
Added Is_dyanamic_fee to TxType (#2296)
* Is dyanamic fee to TxType * Update envelope.rs * fmt --------- Co-authored-by: Matthias Seitz <[email protected]>
1 parent 434c306 commit 0b523fb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/consensus/src/transaction/envelope.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ impl TxType {
160160
pub const fn is_eip7702(&self) -> bool {
161161
matches!(self, Self::Eip7702)
162162
}
163+
164+
/// Returns true if the transaction type has dynamic fee.
165+
#[inline]
166+
pub const fn is_dynamic_fee(&self) -> bool {
167+
matches!(self, Self::Eip1559 | Self::Eip4844 | Self::Eip7702)
168+
}
163169
}
164170

165171
impl fmt::Display for TxType {

0 commit comments

Comments
 (0)