deps: bump SDK and Tendermint versions (#165)

* deps: bump SDK and Tendermint versions

* use header hash from context

* c++

* typo
This commit is contained in:
Federico Kunze
2021-06-22 04:25:38 -04:00
committed by GitHub
parent 95bd7563d4
commit 4ca7c43b62
8 changed files with 20 additions and 18 deletions
-2
View File
@@ -4,7 +4,6 @@ import (
"math/big"
"time"
"github.com/ethereum/go-ethereum/common"
ethtypes "github.com/ethereum/go-ethereum/core/types"
abci "github.com/tendermint/tendermint/abci/types"
@@ -21,7 +20,6 @@ func (k *Keeper) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {
defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker)
k.WithContext(ctx)
k.WithChainID(ctx)
k.headerHash = common.BytesToHash(req.Hash)
}
// EndBlock updates the accounts and commits state objects to the KV Store, while
-4
View File
@@ -26,7 +26,6 @@ type Keeper struct {
// - storing Account's Code
// - storing transaction Logs
// - storing block height -> bloom filter map. Needed for the Web3 API.
// - storing block hash -> block height map. Needed for the Web3 API. TODO: remove
storeKey sdk.StoreKey
// key to access the transient store, which is reset on every block during Commit
@@ -41,9 +40,6 @@ type Keeper struct {
// chain ID number obtained from the context's chain id
eip155ChainID *big.Int
debug bool
// hash header for the current height. Reset during abci.RequestBeginBlock
headerHash common.Hash
}
// NewKeeper generates new evm module keeper
+1 -2
View File
@@ -67,8 +67,7 @@ func (k Keeper) GetHashFn() vm.GetHashFunc {
case k.ctx.BlockHeight() == h:
// Case 1: The requested height matches the one from the context so we can retrieve the header
// hash directly from the context.
// TODO: deprecate field from the keeper on next SDK release
return k.headerHash
return common.BytesToHash(k.ctx.HeaderHash())
case k.ctx.BlockHeight() > h:
// Case 2: if the chain is not the current height we need to retrieve the hash from the store for the
+1 -1
View File
@@ -578,7 +578,7 @@ func (k *Keeper) AddLog(log *ethtypes.Log) {
log.TxHash = tx.Hash()
}
log.BlockHash = k.headerHash
log.BlockHash = common.BytesToHash(k.ctx.HeaderHash())
log.TxIndex = uint(k.GetTxIndexTransient())
logs := k.GetTxLogs(log.TxHash)