aboutsummaryrefslogtreecommitdiffstats
path: root/miner/worker.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-15 19:45:15 +0800
committerFelix Lange <fjl@twurst.com>2016-04-15 19:45:15 +0800
commit6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea (patch)
tree1b3b3677892e2d94400f3604dc6c2dda4c05ccd4 /miner/worker.go
parent5c17b2f5211ec98a87140c874483681de4e34391 (diff)
parentbf5ae502ef179490a039c9bcd66d32cd5a7ce5e9 (diff)
downloadgo-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.gz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.bz2
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.lz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.xz
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.tar.zst
go-tangerine-6197fbf8d70c1aa96c3e87de91ff3f46f454c1ea.zip
Merge pull request #2458 from fjl/go-vet
all: fix go vet warnings
Diffstat (limited to 'miner/worker.go')
-rw-r--r--miner/worker.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 68e99053f..21588e310 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -279,7 +279,7 @@ func (self *worker) wait() {
glog.V(logger.Error).Infoln("mining err", err)
continue
}
- go self.mux.Post(core.NewMinedBlockEvent{block})
+ go self.mux.Post(core.NewMinedBlockEvent{Block: block})
} else {
work.state.Commit()
parent := self.chain.GetBlock(block.ParentHash())
@@ -322,11 +322,11 @@ func (self *worker) wait() {
// broadcast before waiting for validation
go func(block *types.Block, logs vm.Logs, receipts []*types.Receipt) {
- self.mux.Post(core.NewMinedBlockEvent{block})
- self.mux.Post(core.ChainEvent{block, block.Hash(), logs})
+ self.mux.Post(core.NewMinedBlockEvent{Block: block})
+ self.mux.Post(core.ChainEvent{Block: block, Hash: block.Hash(), Logs: logs})
if stat == core.CanonStatTy {
- self.mux.Post(core.ChainHeadEvent{block})
+ self.mux.Post(core.ChainHeadEvent{Block: block})
self.mux.Post(logs)
}
if err := core.WriteBlockReceipts(self.chainDb, block.Hash(), receipts); err != nil {
@@ -411,7 +411,7 @@ func (w *worker) setGasPrice(p *big.Int) {
const pct = int64(90)
w.gasPrice = gasprice(p, pct)
- w.mux.Post(core.GasPriceChanged{w.gasPrice})
+ w.mux.Post(core.GasPriceChanged{Price: w.gasPrice})
}
func (self *worker) isBlockLocallyMined(current *Work, deepBlockNum uint64) bool {