rename to blobBaseFee

This commit is contained in:
Sina Mahmoodi 2024-02-19 19:44:54 +01:00
parent 489ef435fb
commit 0c0b13d22f
2 changed files with 5 additions and 5 deletions

View file

@ -1025,7 +1025,7 @@ type BlockOverrides struct {
FeeRecipient *common.Address FeeRecipient *common.Address
PrevRandao *common.Hash PrevRandao *common.Hash
BaseFeePerGas *hexutil.Big BaseFeePerGas *hexutil.Big
BlobGasPrice *hexutil.Big BlobBaseFee *hexutil.Big
} }
// Apply overrides the given header fields into the given block context. // Apply overrides the given header fields into the given block context.
@ -1054,8 +1054,8 @@ func (o *BlockOverrides) Apply(blockCtx *vm.BlockContext) {
if o.BaseFeePerGas != nil { if o.BaseFeePerGas != nil {
blockCtx.BaseFee = o.BaseFeePerGas.ToInt() blockCtx.BaseFee = o.BaseFeePerGas.ToInt()
} }
if o.BlobGasPrice != nil { if o.BlobBaseFee != nil {
blockCtx.BlobBaseFee = o.BlobGasPrice.ToInt() blockCtx.BlobBaseFee = o.BlobBaseFee.ToInt()
} }
} }

View file

@ -161,8 +161,8 @@ func (sim *simulator) execute(ctx context.Context, blocks []simBlock) ([]simBloc
func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header *types.Header, headers []*types.Header, gp *core.GasPool, precompiles vm.PrecompiledContracts, timeout time.Duration) (*simBlockResult, error) { func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header *types.Header, headers []*types.Header, gp *core.GasPool, precompiles vm.PrecompiledContracts, timeout time.Duration) (*simBlockResult, error) {
blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, sim.b), nil) blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, sim.b), nil)
if block.BlockOverrides != nil && block.BlockOverrides.BlobGasPrice != nil { if block.BlockOverrides != nil && block.BlockOverrides.BlobBaseFee != nil {
blockContext.BlobBaseFee = block.BlockOverrides.BlobGasPrice.ToInt() blockContext.BlobBaseFee = block.BlockOverrides.BlobBaseFee.ToInt()
} }
// Respond to BLOCKHASH requests. // Respond to BLOCKHASH requests.
blockContext.GetHash = func(n uint64) common.Hash { blockContext.GetHash = func(n uint64) common.Hash {