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
PrevRandao *common.Hash
BaseFeePerGas *hexutil.Big
BlobGasPrice *hexutil.Big
BlobBaseFee *hexutil.Big
}
// 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 {
blockCtx.BaseFee = o.BaseFeePerGas.ToInt()
}
if o.BlobGasPrice != nil {
blockCtx.BlobBaseFee = o.BlobGasPrice.ToInt()
if o.BlobBaseFee != nil {
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) {
blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, sim.b), nil)
if block.BlockOverrides != nil && block.BlockOverrides.BlobGasPrice != nil {
blockContext.BlobBaseFee = block.BlockOverrides.BlobGasPrice.ToInt()
if block.BlockOverrides != nil && block.BlockOverrides.BlobBaseFee != nil {
blockContext.BlobBaseFee = block.BlockOverrides.BlobBaseFee.ToInt()
}
// Respond to BLOCKHASH requests.
blockContext.GetHash = func(n uint64) common.Hash {