@@ -133,53 +133,61 @@ func TestGasConfigForAttemptType0(t *testing.T) {
133133 },
134134 },
135135 {
136- name : "empty type 2" ,
137- cfg : config2.Gas {TxType : 2 },
138- ri : 0 ,
139- expected : config2.Gas {
140- TxType : 2 ,
141- GasLimit : 0 ,
142- MaxPriorityMultiplier : big .NewInt (2 ),
143- BaseFeeMultiplier : big .NewInt (3 ),
144- BaseFeePerGasCap : nil ,
145- },
136+ name : "empty type 2" ,
137+ cfg : config2.Gas {TxType : 2 },
138+ ri : 0 ,
139+ expected : config2 .DefaultGas (),
146140 },
147141 {
148142 name : "zero type 2" ,
149143 cfg : config2.Gas {
150144 TxType : 2 ,
151145 MaxPriorityMultiplier : big .NewInt (0 ),
152146 BaseFeeMultiplier : big .NewInt (0 ),
147+ },
148+ ri : 0 ,
149+ expected : config2 .DefaultGas (),
150+ },
151+ {
152+ name : "zero type 2,2 " ,
153+ cfg : config2.Gas {
154+ TxType : 2 ,
155+ MaxPriorityMultiplier : big .NewInt (6 ),
156+ BaseFeeMultiplier : big .NewInt (2 ),
153157 BaseFeePerGasCap : big .NewInt (0 ),
154158 },
155- ri : 0 ,
159+ ri : 2 ,
156160 expected : config2.Gas {
157161 TxType : 2 ,
158162 GasLimit : 0 ,
159- MaxPriorityMultiplier : big .NewInt (2 ),
160- BaseFeeMultiplier : big .NewInt (3 ),
163+ MaxPriorityMultiplier : big .NewInt (8 ),
164+ BaseFeeMultiplier : big .NewInt (4 ),
161165 BaseFeePerGasCap : big .NewInt (0 ),
166+ MaximalMaxPriorityFee : big .NewInt (6160500000000 ),
167+ MinimalMaxPriorityFee : big .NewInt (123210000000 ),
162168 },
163169 },
164170 {
165- name : "zero type 2" ,
171+ name : "type 2" ,
166172 cfg : config2.Gas {
167173 TxType : 2 ,
168- MaxPriorityMultiplier : big . NewInt ( 6 ) ,
174+ GasLimit : 0 ,
169175 BaseFeeMultiplier : big .NewInt (2 ),
170- BaseFeePerGasCap : big .NewInt (0 ),
176+ MaxPriorityMultiplier : big .NewInt (6 ),
177+ MaximalMaxPriorityFee : big .NewInt (1000 ),
178+ MinimalMaxPriorityFee : big .NewInt (100 ),
171179 },
172180 ri : 2 ,
173181 expected : config2.Gas {
174182 TxType : 2 ,
175183 GasLimit : 0 ,
176- MaxPriorityMultiplier : big .NewInt (8 ),
177184 BaseFeeMultiplier : big .NewInt (4 ),
178- BaseFeePerGasCap : big .NewInt (0 ),
185+ MaxPriorityMultiplier : big .NewInt (8 ),
186+ MaximalMaxPriorityFee : big .NewInt (1232 ),
187+ MinimalMaxPriorityFee : big .NewInt (123 ),
179188 },
180189 },
181190 }
182-
183191 for _ , test := range tests {
184192 t .Run (test .name , func (t * testing.T ) {
185193 got := chain .GasConfigForAttempt (& test .cfg , test .ri )
@@ -196,8 +204,10 @@ func TestGasConfigForAttemptType0(t *testing.T) {
196204 }
197205 case 2 :
198206 require .Equal (t , test .expected .BaseFeeMultiplier , got .BaseFeeMultiplier )
199- require .Equal (t , test .expected .MaxPriorityMultiplier , got .MaxPriorityMultiplier )
207+ require .Equal (t , test .expected .MaxPriorityMultiplier , got .MaxPriorityMultiplier , "primul" )
200208 require .Equal (t , test .expected .BaseFeePerGasCap , got .BaseFeePerGasCap )
209+ require .Equal (t , test .expected .MaximalMaxPriorityFee , got .MaximalMaxPriorityFee , "mincap" )
210+ require .Equal (t , test .expected .MinimalMaxPriorityFee , got .MinimalMaxPriorityFee , "maxcap" )
201211 }
202212 })
203213 }
0 commit comments