evm, rpc: fix parameters and block gas limit in getBlockByHeight and getBlockByHash (#312)

* fix evm set parameters

* recompute header hash only if its not set

* Update x/evm/keeper/state_transition.go

Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
This commit is contained in:
Thomas Nguy
2021-07-19 01:52:44 +00:00
committed by GitHub
co-authored by Federico Kunze Küllmer
parent 0a8f02e067
commit c8b88a3a8b
7 changed files with 33 additions and 5 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ func (k *Keeper) NewEVM(msg core.Message, config *params.ChainConfig) *vm.EVM {
Transfer: core.Transfer,
GetHash: k.GetHashFn(),
Coinbase: common.Address{}, // there's no beneficiary since we're not mining
GasLimit: blockGasMeter.Limit(),
GasLimit: gasLimit,
BlockNumber: blockHeight,
Time: blockTime,
Difficulty: 0, // unused. Only required in PoW context