@@ -553,15 +553,16 @@ func (tc *testcase) updateEnv(env hivesim.Params) {
553553// toGethGenesis creates the genesis specification from a test block.
554554func toGethGenesis (test * btJSON ) * core.Genesis {
555555 genesis := & core.Genesis {
556- Nonce : test .Genesis .Nonce .Uint64 (),
557- Timestamp : test .Genesis .Timestamp .Uint64 (),
558- ExtraData : test .Genesis .ExtraData ,
559- GasLimit : test .Genesis .GasLimit ,
560- Difficulty : test .Genesis .Difficulty ,
561- Mixhash : test .Genesis .MixHash ,
562- Coinbase : test .Genesis .Coinbase ,
563- Alloc : test .Pre ,
564- BaseFee : test .Genesis .BaseFee ,
556+ Nonce : test .Genesis .Nonce .Uint64 (),
557+ Timestamp : test .Genesis .Timestamp .Uint64 (),
558+ ExtraData : test .Genesis .ExtraData ,
559+ GasLimit : test .Genesis .GasLimit ,
560+ Difficulty : test .Genesis .Difficulty ,
561+ Mixhash : test .Genesis .MixHash ,
562+ Coinbase : test .Genesis .Coinbase ,
563+ Alloc : test .Pre ,
564+ BaseFee : test .Genesis .BaseFee ,
565+ ExcessBlobGas : test .Genesis .ExcessBlobGas ,
565566 }
566567 return genesis
567568}
@@ -651,7 +652,15 @@ func compareGenesis(have string, want btHeader) (string, error) {
651652 cmp (haveGenesis .GasUsed , want .GasUsed , "gasUsed" )
652653 cmp (haveGenesis .Nonce , want .Nonce , "nonce" )
653654 cmp (haveGenesis .BaseFee , want .BaseFee , "baseFeePerGas" )
654- cmp (haveGenesis .ExcessBlobGas , want .ExcessBlobGas , "excessBlobGas" )
655- cmp (haveGenesis .BlobGasUsed , want .BlobGasUsed , "blobGasUsed" )
655+ if haveGenesis .ExcessBlobGas != nil && want .ExcessBlobGas != nil {
656+ cmp (* haveGenesis .ExcessBlobGas , * want .ExcessBlobGas , "excessBlobGas" )
657+ } else {
658+ cmp (haveGenesis .ExcessBlobGas , want .ExcessBlobGas , "excessBlobGas" )
659+ }
660+ if haveGenesis .BlobGasUsed != nil && want .BlobGasUsed != nil {
661+ cmp (* haveGenesis .BlobGasUsed , * want .BlobGasUsed , "blobGasUsed" )
662+ } else {
663+ cmp (haveGenesis .BlobGasUsed , want .BlobGasUsed , "blobGasUsed" )
664+ }
656665 return output , nil
657666}
0 commit comments