mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
fix Block overrides case
This commit is contained in:
parent
a53e59b279
commit
b4f1640675
1 changed files with 5 additions and 0 deletions
|
|
@ -819,6 +819,11 @@ func DoEstimateGas(ctx context.Context, b Backend, args TransactionArgs, blockNr
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
blockCtx := core.NewEVMBlockContext(header, NewChainContext(ctx, b), nil)
|
blockCtx := core.NewEVMBlockContext(header, NewChainContext(ctx, b), nil)
|
||||||
|
if blockOverrides != nil {
|
||||||
|
if err := blockOverrides.Apply(&blockCtx); err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
}
|
||||||
rules := b.ChainConfig().Rules(blockCtx.BlockNumber, blockCtx.Random != nil, blockCtx.Time)
|
rules := b.ChainConfig().Rules(blockCtx.BlockNumber, blockCtx.Random != nil, blockCtx.Time)
|
||||||
precompiles := vm.ActivePrecompiledContracts(rules)
|
precompiles := vm.ActivePrecompiledContracts(rules)
|
||||||
if err := overrides.Apply(state, precompiles); err != nil {
|
if err := overrides.Apply(state, precompiles); err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue