aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-19 03:16:33 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-08-19 03:46:26 +0800
commitb4369e10150f4c1211ae1bf2de6cf0567e9a7dd2 (patch)
tree9fdbbe9ff489253506059f2b4f48ac451d3d401e /miner
parent2497f28aa9d74f84468055fbc4675f379b7e4a5a (diff)
downloaddexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar.gz
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar.bz2
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar.lz
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar.xz
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.tar.zst
dexon-b4369e10150f4c1211ae1bf2de6cf0567e9a7dd2.zip
core, miner: write miner receipts
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/miner/worker.go b/miner/worker.go
index df3681470..aa2132a51 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -297,14 +297,17 @@ func (self *worker) wait() {
}
// broadcast before waiting for validation
- go func(block *types.Block, logs state.Logs) {
+ go func(block *types.Block, logs state.Logs, receipts []*types.Receipt) {
self.mux.Post(core.NewMinedBlockEvent{block})
self.mux.Post(core.ChainEvent{block, block.Hash(), logs})
if stat == core.CanonStatTy {
self.mux.Post(core.ChainHeadEvent{block})
self.mux.Post(logs)
}
- }(block, work.state.Logs())
+ if err := core.PutBlockReceipts(self.chainDb, block, receipts); err != nil {
+ glog.V(logger.Warn).Infoln("error writing block receipts:", err)
+ }
+ }(block, work.state.Logs(), work.receipts)
}
// check staleness and display confirmation