Commit b0fb48c3 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #1988 from bas-vk/issue1971

miner: bugfix where blockhash in receipts and logs is left empty
parents ae9e9efa 98cbe135
...@@ -302,6 +302,17 @@ func (self *worker) wait() { ...@@ -302,6 +302,17 @@ func (self *worker) wait() {
glog.V(logger.Error).Infoln("error writing block to chain", err) glog.V(logger.Error).Infoln("error writing block to chain", err)
continue 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 // check if canon block and write transactions
if stat == core.CanonStatTy { if stat == core.CanonStatTy {
// This puts transactions in a extra db for rpc // This puts transactions in a extra db for rpc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment