aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-06 17:22:14 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-04-06 17:22:14 +0800
commitd83a9a8f4429176fc6cc7974c08ce988c879a6bf (patch)
tree278065c3ec19c6017e69a22fff01af77a28931c5 /miner
parent3d8de95f999de6f52f0c1605eb2913278f1d87d2 (diff)
downloaddexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar.gz
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar.bz2
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar.lz
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar.xz
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.tar.zst
dexon-d83a9a8f4429176fc6cc7974c08ce988c879a6bf.zip
miner: don't verify our own blocks, trust the engine
Diffstat (limited to 'miner')
-rw-r--r--miner/worker.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/miner/worker.go b/miner/worker.go
index 347de4e08..b2183b77d 100644
--- a/miner/worker.go
+++ b/miner/worker.go
@@ -279,21 +279,11 @@ func (self *worker) wait() {
go self.mux.Post(core.NewMinedBlockEvent{Block: block})
} else {
work.state.Commit(self.config.IsEIP158(block.Number()))
- parent := self.chain.GetBlock(block.ParentHash(), block.NumberU64()-1)
- if parent == nil {
- log.Error("Invalid block found during mining")
- continue
- }
- if err := self.engine.VerifyHeader(self.chain, block.Header(), false); err != nil {
- log.Error("Invalid header on mined block", "err", err)
- continue
- }
stat, err := self.chain.WriteBlock(block)
if err != nil {
log.Error("Failed writing block to chain", "err", 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 {