File tree Expand file tree Collapse file tree 2 files changed +14
-18
lines changed Expand file tree Collapse file tree 2 files changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,18 @@ class LondonState(BerlinState):
147
147
computation_class = LondonComputation
148
148
transaction_executor_class : Type [TransactionExecutorAPI ] = LondonTransactionExecutor
149
149
150
+ def get_tip (self , transaction : SignedTransactionAPI ) -> int :
151
+ return min (
152
+ transaction .max_fee_per_gas - self .execution_context .base_fee_per_gas ,
153
+ transaction .max_priority_fee_per_gas ,
154
+ )
155
+
156
+ def get_gas_price (self , transaction : SignedTransactionAPI ) -> int :
157
+ return min (
158
+ transaction .max_fee_per_gas ,
159
+ transaction .max_priority_fee_per_gas + self .execution_context .base_fee_per_gas ,
160
+ )
161
+
150
162
def validate_transaction (
151
163
self ,
152
164
transaction : SignedTransactionAPI
Original file line number Diff line number Diff line change @@ -88,27 +88,11 @@ def difficulty(self) -> int:
88
88
def gas_limit (self ) -> int :
89
89
return self .execution_context .gas_limit
90
90
91
- def _get_burn_price (self ) -> int :
92
- """
93
- How much of the gas price will be burned?
94
- """
95
- execution_context = self .execution_context
96
- try :
97
- return execution_context .base_fee_per_gas
98
- except AttributeError :
99
- return 0
100
-
101
91
def get_tip (self , transaction : SignedTransactionAPI ) -> int :
102
- return min (
103
- transaction .max_fee_per_gas - self ._get_burn_price (),
104
- transaction .max_priority_fee_per_gas ,
105
- )
92
+ return transaction .gas_price
106
93
107
94
def get_gas_price (self , transaction : SignedTransactionAPI ) -> int :
108
- return min (
109
- transaction .max_fee_per_gas ,
110
- transaction .max_priority_fee_per_gas + self ._get_burn_price (),
111
- )
95
+ return transaction .gas_price
112
96
113
97
#
114
98
# Access to account db
You can’t perform that action at this time.
0 commit comments