core: check for bor config when enabling prague requests

This commit is contained in:
Manav Darji 2025-04-30 14:58:51 -04:00
parent 8ea52f5036
commit 73fa700a9a
No known key found for this signature in database
GPG key ID: A426F0124435F36E
3 changed files with 3 additions and 3 deletions

View file

@ -478,7 +478,7 @@ func GenerateVerkleChain(config *params.ChainConfig, parent *types.Block, engine
// preState := statedb.Copy()
// Pre-execution system calls.
if config.IsPrague(b.header.Number) {
if config.IsPrague(b.header.Number) && config.Bor == nil {
// EIP-2935
blockContext := NewEVMBlockContext(b.header, cm, &b.header.Coinbase)
vmenv := vm.NewEVM(blockContext, vm.TxContext{}, statedb, cm.config, vm.Config{})

View file

@ -511,7 +511,7 @@ func (g *Genesis) toBlockWithRoot(root common.Hash) *types.Block {
head.BlobGasUsed = new(uint64)
}
}
if conf.IsPrague(num) {
if conf.IsPrague(num) && conf.Bor == nil {
emptyRequests := [][]byte{{0x00}, {0x01}, {0x02}}
rhash := types.CalcRequestsHash(emptyRequests)
head.RequestsHash = &rhash

View file

@ -89,7 +89,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
if beaconRoot := block.BeaconRoot(); beaconRoot != nil {
ProcessBeaconBlockRoot(*beaconRoot, vmenv, tracingStateDB)
}
if p.config.IsPrague(block.Number()) {
if p.config.IsPrague(block.Number()) && p.config.Bor == nil {
ProcessParentBlockHash(block.ParentHash(), vmenv, tracingStateDB)
}