From ccc0c4eeb84826cbd9ca8fc49a5490aab060cafc Mon Sep 17 00:00:00 2001
From: ledgerwatch <akhounov@gmail.com>
Date: Mon, 27 Apr 2020 07:42:21 +0100
Subject: [PATCH] Fix receipts (#488)

---
 core/blockchain.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/blockchain.go b/core/blockchain.go
index 5939562042..1518936dc8 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -2472,7 +2472,8 @@ func (bc *BlockChain) ExecuteBlockEuphemerally(block *types.Block, stateReader s
 		misc.ApplyDAOHardFork(ibs)
 	}
 	noop := state.NewNoopWriter()
-	for _, tx := range block.Transactions() {
+	for i, tx := range block.Transactions() {
+		ibs.Prepare(tx.Hash(), block.Hash(), i)
 		receipt, err := ApplyTransaction(chainConfig, bc, nil, gp, ibs, noop, header, tx, usedGas, vmConfig)
 		if err != nil {
 			return fmt.Errorf("tx %x failed: %v", tx.Hash(), err)
-- 
GitLab