From 075639e9a86f297ebece979beea7f965ccd7bc88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rodr=C3=ADguez?= Date: Tue, 21 Nov 2017 19:17:02 +0100 Subject: [PATCH 1/2] using TxHash for appHash --- app/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/app.go b/app/app.go index e26138acd3..5dcfaf402b 100644 --- a/app/app.go +++ b/app/app.go @@ -55,7 +55,7 @@ func (app *EthermintApplication) Info() abciTypes.ResponseInfo { blockchain := app.backend.Ethereum().BlockChain() currentBlock := blockchain.CurrentBlock() height := currentBlock.Number() - hash := currentBlock.Hash() + hash := currentBlock.TxHash() // This check determines whether it is the first time ethermint gets started. // If it is the first time, then we have to respond with an empty hash, since From a5f9c2e4cbfcd94e27fb57a5ff6bfe80ac15e4a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9sar=20Rodr=C3=ADguez?= Date: Tue, 21 Nov 2017 19:18:29 +0100 Subject: [PATCH 2/2] using TxHash instead of BlockHash for appHash --- ethereum/pending.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/pending.go b/ethereum/pending.go index 16de3c633b..a5521c5c84 100644 --- a/ethereum/pending.go +++ b/ethereum/pending.go @@ -187,7 +187,7 @@ func (w *work) commit(blockchain *core.BlockChain, db ethdb.Database) (common.Ha // create block object and compute final commit hash (hash of the ethereum block) block := ethTypes.NewBlock(w.header, w.transactions, nil, w.receipts) - blockHash := block.Hash() + blockHash := block.TxHash() // save the block to disk log.Info("Committing block", "stateHash", hashArray, "blockHash", blockHash)