mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
rename to blobGasPrice
This commit is contained in:
parent
1e7b497fb3
commit
589107b6f5
2 changed files with 7 additions and 7 deletions
|
|
@ -1012,9 +1012,7 @@ type BlockOverrides struct {
|
||||||
FeeRecipient *common.Address
|
FeeRecipient *common.Address
|
||||||
PrevRandao *common.Hash
|
PrevRandao *common.Hash
|
||||||
BaseFeePerGas *hexutil.Big
|
BaseFeePerGas *hexutil.Big
|
||||||
// TODO: is this right? should we override this since it doesn't exist
|
BlobGasPrice *hexutil.Big
|
||||||
// in header or excessBlobGas which is used to calculate the base fee?
|
|
||||||
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.
|
||||||
|
|
@ -1043,13 +1041,15 @@ 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.BlobBaseFee != nil {
|
if o.BlobGasPrice != nil {
|
||||||
blockCtx.BlobBaseFee = o.BlobBaseFee.ToInt()
|
blockCtx.BlobBaseFee = o.BlobGasPrice.ToInt()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MakeHeader returns a new header object with the overridden
|
// MakeHeader returns a new header object with the overridden
|
||||||
// fields.
|
// fields.
|
||||||
|
// Note: MakeHeader ignores blobGasPrice if set. That's because
|
||||||
|
// header has no such field.
|
||||||
func (o *BlockOverrides) MakeHeader(header *types.Header) *types.Header {
|
func (o *BlockOverrides) MakeHeader(header *types.Header) *types.Header {
|
||||||
if o == nil {
|
if o == nil {
|
||||||
return header
|
return header
|
||||||
|
|
|
||||||
|
|
@ -141,8 +141,8 @@ func (mc *multicall) execute(ctx context.Context, opts mcOpts) ([]mcBlockResult,
|
||||||
for bi, block := range blocks {
|
for bi, block := range blocks {
|
||||||
header := headers[bi]
|
header := headers[bi]
|
||||||
blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, mc.b), nil)
|
blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, mc.b), nil)
|
||||||
if block.BlockOverrides != nil && block.BlockOverrides.BlobBaseFee != nil {
|
if block.BlockOverrides != nil && block.BlockOverrides.BlobGasPrice != nil {
|
||||||
blockContext.BlobBaseFee = block.BlockOverrides.BlobBaseFee.ToInt()
|
blockContext.BlobBaseFee = block.BlockOverrides.BlobGasPrice.ToInt()
|
||||||
}
|
}
|
||||||
// Respond to BLOCKHASH requests.
|
// Respond to BLOCKHASH requests.
|
||||||
blockContext.GetHash = func(n uint64) common.Hash {
|
blockContext.GetHash = func(n uint64) common.Hash {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue