Skip to content

Commit

Permalink
Problem: missing assign statedb to ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Nov 1, 2023
1 parent b9078ab commit ebd7ef9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (statedb) [#333](https://github.com/crypto-org-chain/ethermint/pull/333) Support native action in statedb, prepare for precompiles.
* (rpc) [#369](https://github.com/crypto-org-chain/ethermint/pull/369) Support state overrides in eth_call.
* (precompile) [#371](https://github.com/crypto-org-chain/ethermint/pull/371) Add StateDB itself into native context for precompiles to emit evm logs directly.
* (precompile) [#](https://github.com/crypto-org-chain/ethermint/pull/) Add missing assign statedb to ctx.

### State Machine Breaking

Expand Down
2 changes: 1 addition & 1 deletion x/evm/keeper/state_transition.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ func (k *Keeper) ApplyMessageWithConfig(ctx sdk.Context,
return nil, errorsmod.Wrap(err, "failed to apply state override")
}
}

ctx = ctx.WithValue(statedb.StateDBContextKey, stateDB)
evm := k.NewEVM(ctx, msg, cfg, tracer, stateDB, k.customContracts)
leftoverGas := msg.Gas()
// Allow the tracer captures the tx level events, mainly the gas consumption.
Expand Down

0 comments on commit ebd7ef9

Please sign in to comment.