mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +00:00
chg : major fix
This commit is contained in:
parent
6baa56bc25
commit
002717ad23
1 changed files with 14 additions and 3 deletions
|
|
@ -702,11 +702,22 @@ func (api *API) traceBlock(ctx context.Context, block *types.Block, config *Trac
|
|||
// Generate the next state snapshot fast without tracing
|
||||
msg, _ := tx.AsMessage(signer, block.BaseFee())
|
||||
statedb.Prepare(tx.Hash(), i)
|
||||
|
||||
vmenv := vm.NewEVM(blockCtx, core.NewEVMTxContext(msg), statedb, api.backend.ChainConfig(), vm.Config{})
|
||||
if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(msg.Gas())); err != nil {
|
||||
failed = err
|
||||
break
|
||||
|
||||
if stateSyncPresent && i == len(txs)-1 {
|
||||
callmsg := prepareCallMessage(msg)
|
||||
if _, err := statefull.ApplyBorMessage(*vmenv, callmsg); err != nil {
|
||||
failed = err
|
||||
break
|
||||
}
|
||||
} else {
|
||||
if _, err := core.ApplyMessage(vmenv, msg, new(core.GasPool).AddGas(msg.Gas())); err != nil {
|
||||
failed = err
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// Finalize the state so any modifications are written to the trie
|
||||
// Only delete empty objects if EIP158/161 (a.k.a Spurious Dragon) is in effect
|
||||
statedb.Finalise(vmenv.ChainConfig().IsEIP158(block.Number()))
|
||||
|
|
|
|||
Loading…
Reference in a new issue