@@ -184,9 +184,6 @@ func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend) erro
184
184
if args .BlobFeeCap != nil && args .BlobFeeCap .ToInt ().Sign () == 0 {
185
185
return errors .New ("maxFeePerBlobGas, if specified, must be non-zero" )
186
186
}
187
- if err := args .setCancunFeeDefaults (ctx , head , b ); err != nil {
188
- return err
189
- }
190
187
// If both gasPrice and at least one of the EIP-1559 fee parameters are specified, error.
191
188
if args .GasPrice != nil && (args .MaxFeePerGas != nil || args .MaxPriorityFeePerGas != nil ) {
192
189
return errors .New ("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified" )
@@ -204,7 +201,10 @@ func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend) erro
204
201
if args .MaxFeePerGas .ToInt ().Cmp (args .MaxPriorityFeePerGas .ToInt ()) < 0 {
205
202
return fmt .Errorf ("maxFeePerGas (%v) < maxPriorityFeePerGas (%v)" , args .MaxFeePerGas , args .MaxPriorityFeePerGas )
206
203
}
207
- return nil // No need to set anything, user already set MaxFeePerGas and MaxPriorityFeePerGas
204
+ // No need to set anything other than CancunFeeDefaults, user already set MaxFeePerGas and MaxPriorityFeePerGas
205
+ if err := args .setCancunFeeDefaults (ctx , head , b ); err != nil {
206
+ return err
207
+ }
208
208
}
209
209
210
210
// Sanity check the non-EIP-1559 fee parameters.
@@ -260,7 +260,7 @@ func (args *TransactionArgs) setCancunFeeDefaults(ctx context.Context, head *typ
260
260
val := new (big.Int ).Mul (blobBaseFee , big .NewInt (2 ))
261
261
args .BlobFeeCap = (* hexutil .Big )(val )
262
262
}
263
- return nil
263
+ return args . setLondonFeeDefaults ( ctx , head , b )
264
264
}
265
265
266
266
// setLondonFeeDefaults fills in reasonable default fee values for unspecified fields.
0 commit comments