@@ -269,15 +269,15 @@ func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, pa
269
269
return err
270
270
}
271
271
}
272
- shanghai := chain .Config ().IsShanghai (header .Number )
272
+ shanghai := chain .Config ().IsShanghai (header .Time )
273
273
if shanghai && header .WithdrawalsHash == nil {
274
274
return fmt .Errorf ("missing withdrawalsHash" )
275
275
}
276
276
// Verify existence / non-existence of withdrawalsHash.
277
277
if ! shanghai && header .WithdrawalsHash != nil {
278
278
return fmt .Errorf ("invalid withdrawalsHash: have %s, expected nil" , header .WithdrawalsHash )
279
279
}
280
- if chain .Config ().IsSharding (header .Number ) {
280
+ if chain .Config ().IsSharding (header .Time ) {
281
281
// Verify the header's EIP-4844 attributes.
282
282
if err := misc .VerifyEip4844Header (chain .Config (), parent , header ); err != nil {
283
283
return err
@@ -350,15 +350,15 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.
350
350
return
351
351
}
352
352
// If withdrawals have been activated, process each one.
353
- if chain .Config ().IsShanghai (header .Number ) {
353
+ if chain .Config ().IsShanghai (header .Time ) {
354
354
for _ , w := range withdrawals {
355
355
state .AddBalance (w .Address , w .Amount )
356
356
}
357
357
}
358
358
// The block reward is no longer handled here. It's done by the
359
359
// external consensus engine.
360
360
header .Root = state .IntermediateRoot (true )
361
- if chain .Config ().IsSharding (header .Number ) {
361
+ if chain .Config ().IsSharding (header .Time ) {
362
362
if parent := chain .GetHeaderByHash (header .ParentHash ); parent != nil {
363
363
header .SetExcessDataGas (misc .CalcExcessDataGas (parent .ExcessDataGas , misc .CountBlobs (txs )))
364
364
} else {
0 commit comments