@@ -269,15 +269,15 @@ func (beacon *Beacon) verifyHeader(chain consensus.ChainHeaderReader, header, pa
269269 return err
270270 }
271271 }
272- shanghai := chain .Config ().IsShanghai (header .Number )
272+ shanghai := chain .Config ().IsShanghai (header .Time )
273273 if shanghai && header .WithdrawalsHash == nil {
274274 return fmt .Errorf ("missing withdrawalsHash" )
275275 }
276276 // Verify existence / non-existence of withdrawalsHash.
277277 if ! shanghai && header .WithdrawalsHash != nil {
278278 return fmt .Errorf ("invalid withdrawalsHash: have %s, expected nil" , header .WithdrawalsHash )
279279 }
280- if chain .Config ().IsSharding (header .Number ) {
280+ if chain .Config ().IsSharding (header .Time ) {
281281 // Verify the header's EIP-4844 attributes.
282282 if err := misc .VerifyEip4844Header (chain .Config (), parent , header ); err != nil {
283283 return err
@@ -350,15 +350,15 @@ func (beacon *Beacon) Finalize(chain consensus.ChainHeaderReader, header *types.
350350 return
351351 }
352352 // If withdrawals have been activated, process each one.
353- if chain .Config ().IsShanghai (header .Number ) {
353+ if chain .Config ().IsShanghai (header .Time ) {
354354 for _ , w := range withdrawals {
355355 state .AddBalance (w .Address , w .Amount )
356356 }
357357 }
358358 // The block reward is no longer handled here. It's done by the
359359 // external consensus engine.
360360 header .Root = state .IntermediateRoot (true )
361- if chain .Config ().IsSharding (header .Number ) {
361+ if chain .Config ().IsSharding (header .Time ) {
362362 if parent := chain .GetHeaderByHash (header .ParentHash ); parent != nil {
363363 header .SetExcessDataGas (misc .CalcExcessDataGas (parent .ExcessDataGas , misc .CountBlobs (txs )))
364364 } else {
0 commit comments