aboutsummaryrefslogtreecommitdiffstats
path: root/miner
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-11-10 08:17:31 +0800
committerobscuren <geffobscura@gmail.com>2014-11-10 08:17:31 +0800
commitcbeebcd47da846e1b8990313f1ff1ffe7d0bf00f (patch)
tree95db04f468e66ebb26afd81bc72abea8fbcf7c0e /miner
parentf538ea25e46d59dfa225ed105343d9c6a9909c2c (diff)
downloaddexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.gz
dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.zst
dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.zip
Fixed bloom, updated mining & block processing
* Reverted back to process blocks in batches method * Bloom generation and lookup fix * Minor UI changed (mainly debug)
Diffstat (limited to 'miner')
-rw-r--r--miner/miner.go29
1 files changed, 26 insertions, 3 deletions
diff --git a/miner/miner.go b/miner/miner.go
index 2ab74e516..a678a6895 100644
--- a/miner/miner.go
+++ b/miner/miner.go
@@ -1,3 +1,26 @@
+/*
+ This file is part of go-ethereum
+
+ go-ethereum is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ go-ethereum is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with go-ethereum. If not, see <http://www.gnu.org/licenses/>.
+*/
+/**
+ * @authors
+ * Jeffrey Wilcke <i@jev.io>
+ * @date 2014
+ *
+ */
+
package miner
import (
@@ -190,12 +213,12 @@ func (self *Miner) mine() {
if nonce != nil {
block.Nonce = nonce
lchain := chain.NewChain(chain.Blocks{block})
- _, err := chainMan.TestChain(lchain, true)
+ _, err := chainMan.TestChain(lchain)
if err != nil {
minerlogger.Infoln(err)
} else {
- //chainMan.InsertChain(lchain)
- self.eth.EventMux().Post(chain.NewBlockEvent{block})
+ chainMan.InsertChain(lchain)
+ //self.eth.EventMux().Post(chain.NewBlockEvent{block})
self.eth.Broadcast(wire.MsgBlockTy, []interface{}{block.Value().Val})
minerlogger.Infof("🔨 Mined block %x\n", block.Hash())