@@ -40,7 +40,7 @@ impl TransactionOrder {
4040 pub fn priority ( & self , tx : & TypedTransaction ) -> TransactionPriority {
4141 match self {
4242 Self :: Fifo => TransactionPriority :: default ( ) ,
43- Self :: Fees => TransactionPriority ( tx. gas_price ( ) . unwrap_or ( 0 ) ) ,
43+ Self :: Fees => TransactionPriority ( tx. max_fee_per_gas ( ) ) ,
4444 }
4545 }
4646}
@@ -95,9 +95,9 @@ impl PoolTransaction {
9595 * self . pending_transaction . hash ( )
9696 }
9797
98- /// Returns the gas pric of this transaction
99- pub fn gas_price ( & self ) -> Option < u128 > {
100- self . pending_transaction . transaction . gas_price ( )
98+ /// Returns the max fee per gas of this transaction
99+ pub fn max_fee_per_gas ( & self ) -> u128 {
100+ self . pending_transaction . transaction . max_fee_per_gas ( )
101101 }
102102
103103 /// Returns the type of the transaction
@@ -182,7 +182,7 @@ impl PendingTransactions {
182182 . and_then ( |hash| self . waiting_queue . get ( hash) )
183183 {
184184 // check if underpriced
185- if tx. transaction . gas_price ( ) < replace. transaction . gas_price ( ) {
185+ if tx. transaction . max_fee_per_gas ( ) < replace. transaction . max_fee_per_gas ( ) {
186186 warn ! ( target: "txpool" , "pending replacement transaction underpriced [{:?}]" , tx. transaction. hash( ) ) ;
187187 return Err ( PoolError :: ReplacementUnderpriced ( Box :: new (
188188 tx. transaction . as_ref ( ) . clone ( ) ,
@@ -514,7 +514,9 @@ impl ReadyTransactions {
514514 // (addr + nonce) then we check for gas price
515515 if to_remove. provides ( ) == tx. provides {
516516 // check if underpriced
517- if tx. pending_transaction . transaction . gas_price ( ) <= to_remove. gas_price ( ) {
517+ if tx. pending_transaction . transaction . max_fee_per_gas ( )
518+ <= to_remove. max_fee_per_gas ( )
519+ {
518520 warn ! ( target: "txpool" , "ready replacement transaction underpriced [{:?}]" , tx. hash( ) ) ;
519521 return Err ( PoolError :: ReplacementUnderpriced ( Box :: new ( tx. clone ( ) ) ) ) ;
520522 } else {
@@ -712,8 +714,8 @@ impl ReadyTransaction {
712714 & self . transaction . transaction . provides
713715 }
714716
715- pub fn gas_price ( & self ) -> Option < u128 > {
716- self . transaction . transaction . gas_price ( )
717+ pub fn max_fee_per_gas ( & self ) -> u128 {
718+ self . transaction . transaction . max_fee_per_gas ( )
717719 }
718720}
719721
0 commit comments