diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-11-19 23:02:49 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-11-19 23:02:49 +0800 |
commit | 98cbe1356e17f761279228ef25564eac900ad6ef (patch) | |
tree | 6f021231238fe5f922ee40e0d8fcba8c52320f5d /miner/worker.go | |
parent | 4c2933ad825aa11ce118abddfe6eeafc0422b2b6 (diff) | |
download | dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar.gz dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar.bz2 dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar.lz dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar.xz dexon-98cbe1356e17f761279228ef25564eac900ad6ef.tar.zst dexon-98cbe1356e17f761279228ef25564eac900ad6ef.zip |
miner: bugfix were blockhash in receipts and logs is left empty
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 11 |
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 |