@@ -133,18 +133,35 @@ func Transaction(ctx *cli.Context) error {
133
133
r .Address = sender
134
134
}
135
135
// Check intrinsic gas
136
- if gas , err := core .IntrinsicGas (tx .Data (), tx .AccessList (), tx .SetCodeAuthorizations (), tx .To () == nil ,
137
- chainConfig .IsHomestead (new (big.Int )), chainConfig .IsIstanbul (new (big.Int )), chainConfig .IsShanghai (new (big.Int ), 0 )); err != nil {
136
+ rules := chainConfig .Rules (common .Big0 , true , 0 )
137
+ gas , err := core .IntrinsicGas (tx .Data (), tx .AccessList (), tx .SetCodeAuthorizations (), tx .To () == nil , rules .IsHomestead , rules .IsIstanbul , rules .IsShanghai )
138
+ if err != nil {
138
139
r .Error = err
139
140
results = append (results , r )
140
141
continue
141
- } else {
142
- r .IntrinsicGas = gas
143
- if tx .Gas () < gas {
144
- r .Error = fmt .Errorf ("%w: have %d, want %d" , core .ErrIntrinsicGas , tx .Gas (), gas )
142
+ }
143
+ r .IntrinsicGas = gas
144
+ if tx .Gas () < gas {
145
+ r .Error = fmt .Errorf ("%w: have %d, want %d" , core .ErrIntrinsicGas , tx .Gas (), gas )
146
+ results = append (results , r )
147
+ continue
148
+ }
149
+ // For Prague txs, validate the floor data gas.
150
+ if rules .IsPrague {
151
+ floorDataGas , err := core .FloorDataGas (tx .Data ())
152
+ if err != nil {
153
+ r .Error = err
154
+ results = append (results , r )
155
+ continue
156
+ }
157
+ << << << < Updated upstream
158
+ == == == =
159
+ if tx .Gas () < floorDataGas {
160
+ r.Error = fmt .Errorf ("%w: have %d, want %d" , core .ErrFloorDataGas , tx .Gas (), floorDataGas )
145
161
results = append (results , r )
146
162
continue
147
163
}
164
+ >> >> >> > Stashed changes
148
165
}
149
166
// Validate <256bit fields
150
167
switch {
0 commit comments