mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
correct hardfork rule
This commit is contained in:
parent
a796bf4a81
commit
36beade18c
1 changed files with 4 additions and 0 deletions
|
|
@ -46,8 +46,12 @@ func (c *callContext) toBlockContext(genesis *core.Genesis) vm.BlockContext {
|
|||
}
|
||||
if genesis.Config.IsLondon(context.BlockNumber) {
|
||||
context.BaseFee = (*big.Int)(c.BaseFee)
|
||||
}
|
||||
|
||||
if genesis.Config.TerminalTotalDifficulty != nil && genesis.Config.TerminalTotalDifficulty.Sign() == 0 {
|
||||
context.Random = &genesis.Mixhash
|
||||
}
|
||||
|
||||
if genesis.ExcessBlobGas != nil && genesis.BlobGasUsed != nil {
|
||||
excessBlobGas := eip4844.CalcExcessBlobGas(*genesis.ExcessBlobGas, *genesis.BlobGasUsed)
|
||||
context.BlobBaseFee = eip4844.CalcBlobFee(excessBlobGas)
|
||||
|
|
|
|||
Loading…
Reference in a new issue