aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorBrent <bmperrea@gmail.com>2019-03-27 20:39:25 +0800
committerFelix Lange <fjl@users.noreply.github.com>2019-03-27 20:39:25 +0800
commit7fb89697fd248879a0fd1ac0b925b91b3dda0e22 (patch)
treee4a67ba7f0e12b36a087a30fb0fa468ba455da94 /miner
parent42e2c586fda7e05f9aaa2861e4fbcdaace0639fb (diff)
downloadgo-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 'miner')
-rw-r--r--miner/worker.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 48473796b..80c1771b6 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -566,6 +566,11 @@ func (w *worker) resultLoop() {
logs []*types.Log
)
for i, receipt := range task.receipts {
+ // add block location fields
+ receipt.BlockHash = hash
+ receipt.BlockNumber = block.Number()
+ receipt.TransactionIndex = uint(i)
+
receipts[i] = new(types.Receipt)
*receipts[i] = *receipt
// Update the block hash in all logs since it is now available and not when the