aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-11-24 17:55:07 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-11-24 17:55:07 +0800
commitb0fb48c389460193d9fc0a5118d79ff6dec48ce0 (patch)
tree9a579136f58d19e64b599af801036ab9a1382c72
parentae9e9efa3155e85428172d8b47782c389efbdb41 (diff)
parent98cbe1356e17f761279228ef25564eac900ad6ef (diff)
downloadgo-tangerine-b0fb48c389460193d9fc0a5118d79ff6dec48ce0.tar.gz
go-tangerine-b0fb48c389460193d9fc0a5118d79ff6dec48ce0.tar.zst
go-tangerine-b0fb48c389460193d9fc0a5118d79ff6dec48ce0.zip
Merge pull request #1988 from bas-vk/issue1971
miner: bugfix where blockhash in receipts and logs is left empty
-rw-r--r--miner/worker.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/miner/worker.go b/miner/worker.go
index aa0fa85cb..754a6fc48 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -302,6 +302,17 @@ func (self *worker) wait() {
glog.V(logger.Error).Infoln("error writing block to chain", err)
continue
}
+
+ // update block hash since it is now available and not when the receipt/log of individual transactions were created
+ for _, r := range work.receipts {
+ for _, l := range r.Logs {
+ l.BlockHash = block.Hash()
+ }
+ }
+ for _, log := range work.state.Logs() {
+ log.BlockHash = block.Hash()
+ }
+
// check if canon block and write transactions
if stat == core.CanonStatTy {
// This puts transactions in a extra db for rpc