From 7fb89697fd248879a0fd1ac0b925b91b3dda0e22 Mon Sep 17 00:00:00 2001 From: Brent Date: Wed, 27 Mar 2019 08:39:25 -0400 Subject: core/types: add block location fields to receipt (#17662) Solves #15210 without changing consensus, in a backwards compatible way, by adding tx inclusion information to the Receipt struct. --- core/rawdb/accessors_chain.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'core/rawdb') diff --git a/core/rawdb/accessors_chain.go b/core/rawdb/accessors_chain.go index 10f3ba00f..647839997 100644 --- a/core/rawdb/accessors_chain.go +++ b/core/rawdb/accessors_chain.go @@ -325,6 +325,9 @@ func ReadReceipts(db ethdb.Reader, hash common.Hash, number uint64) types.Receip logIndex += 1 } receipts[i] = (*types.Receipt)(receipt) + receipts[i].BlockHash = hash + receipts[i].BlockNumber = big.NewInt(0).SetUint64(number) + receipts[i].TransactionIndex = uint(i) } return receipts } -- cgit v1.2.3