diff options
author | Brent <bmperrea@gmail.com> | 2019-03-27 20:39:25 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2019-03-27 20:39:25 +0800 |
commit | 7fb89697fd248879a0fd1ac0b925b91b3dda0e22 (patch) | |
tree | e4a67ba7f0e12b36a087a30fb0fa468ba455da94 /core/rawdb | |
parent | 42e2c586fda7e05f9aaa2861e4fbcdaace0639fb (diff) | |
download | go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar.gz go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar.bz2 go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar.lz go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar.xz go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.tar.zst go-tangerine-7fb89697fd248879a0fd1ac0b925b91b3dda0e22.zip |
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.
Diffstat (limited to 'core/rawdb')
-rw-r--r-- | core/rawdb/accessors_chain.go | 3 |
1 files changed, 3 insertions, 0 deletions
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 } |