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
|
||||
PrevRandao *common.Hash
|
||||
BaseFeePerGas *hexutil.Big
|
||||
// TODO: is this right? should we override this since it doesn't exist
|
||||
// in header or excessBlobGas which is used to calculate the base fee?
|
||||
BlobBaseFee *hexutil.Big
|
||||
BlobGasPrice *hexutil.Big
|
||||
}
|
||||
|
||||
// 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 {
|
||||
blockCtx.BaseFee = o.BaseFeePerGas.ToInt()
|
||||
}
|
||||
if o.BlobBaseFee != nil {
|
||||
blockCtx.BlobBaseFee = o.BlobBaseFee.ToInt()
|
||||
if o.BlobGasPrice != nil {
|
||||
blockCtx.BlobBaseFee = o.BlobGasPrice.ToInt()
|
||||
}
|
||||
}
|
||||
|
||||
// MakeHeader returns a new header object with the overridden
|
||||
// fields.
|
||||
// Note: MakeHeader ignores blobGasPrice if set. That's because
|
||||
// header has no such field.
|
||||
func (o *BlockOverrides) MakeHeader(header *types.Header) *types.Header {
|
||||
if o == nil {
|
||||
return header
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ func (mc *multicall) execute(ctx context.Context, opts mcOpts) ([]mcBlockResult,
|
|||
for bi, block := range blocks {
|
||||
header := headers[bi]
|
||||
blockContext := core.NewEVMBlockContext(header, NewChainContext(ctx, mc.b), nil)
|
||||
if block.BlockOverrides != nil && block.BlockOverrides.BlobBaseFee != nil {
|
||||
blockContext.BlobBaseFee = block.BlockOverrides.BlobBaseFee.ToInt()
|
||||
if block.BlockOverrides != nil && block.BlockOverrides.BlobGasPrice != nil {
|
||||
blockContext.BlobBaseFee = block.BlockOverrides.BlobGasPrice.ToInt()
|
||||
}
|
||||
// Respond to BLOCKHASH requests.
|
||||
blockContext.GetHash = func(n uint64) common.Hash {
|
||||
|
|
|
|||
Loading…
Reference in a new issue