aboutsummaryrefslogtreecommitdiffstats
path: root/core/state_processor.go
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 /core/state_processor.go
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 'core/state_processor.go')
-rw-r--r--core/state_processor.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/state_processor.go b/core/state_processor.go
index 503a35d16..6f2a45120 100644
--- a/core/state_processor.go
+++ b/core/state_processor.go
@@ -121,6 +121,9 @@ func ApplyTransaction(config *params.ChainConfig, bc ChainContext, author *commo
// Set the receipt logs and create a bloom for filtering
receipt.Logs = statedb.GetLogs(tx.Hash())
receipt.Bloom = types.CreateBloom(types.Receipts{receipt})
+ receipt.BlockHash = statedb.BlockHash()
+ receipt.BlockNumber = header.Number
+ receipt.TransactionIndex = uint(statedb.TxIndex())
return receipt, gas, err
}