diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-23 21:54:15 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-23 21:54:15 +0800 |
commit | 0651af9dfd701ba09e6c734f21eff85f61454476 (patch) | |
tree | 28d97ddacee2638c6f6b66396a69f381d869f93a /ethminer/miner.go | |
parent | c81804444f69ae1653d54551d8555ff924651cd9 (diff) | |
download | dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar.gz dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar.bz2 dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar.lz dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar.xz dexon-0651af9dfd701ba09e6c734f21eff85f61454476.tar.zst dexon-0651af9dfd701ba09e6c734f21eff85f61454476.zip |
Removed some log statements and disabled additional validation checks
Diffstat (limited to 'ethminer/miner.go')
-rw-r--r-- | ethminer/miner.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ethminer/miner.go b/ethminer/miner.go index d1636ccee..08a4626e4 100644 --- a/ethminer/miner.go +++ b/ethminer/miner.go @@ -134,14 +134,18 @@ func (miner *Miner) listener() { err := miner.ethereum.StateManager().ProcessBlock(miner.block, true) if err != nil { log.Println("Error result from process block:", err) + miner.block.State().Reset() } else { - // XXX @maranh This is already done in the state manager, why a 2nd time? - if !miner.ethereum.StateManager().Pow.Verify(miner.block.HashNoNonce(), miner.block.Difficulty, miner.block.Nonce) { - log.Printf("Second stage verification error: Block's nonce is invalid (= %v)\n", ethutil.Hex(miner.block.Nonce)) - } + /* + // XXX @maranh This is already done in the state manager, why a 2nd time? + if !miner.ethereum.StateManager().Pow.Verify(miner.block.HashNoNonce(), miner.block.Difficulty, miner.block.Nonce) { + log.Printf("Second stage verification error: Block's nonce is invalid (= %v)\n", ethutil.Hex(miner.block.Nonce)) + } + */ miner.ethereum.Broadcast(ethwire.MsgBlockTy, []interface{}{miner.block.Value().Val}) log.Printf("[MINER] 🔨 Mined block %x\n", miner.block.Hash()) + log.Println(miner.block) miner.txs = []*ethchain.Transaction{} // Move this somewhere neat miner.block = miner.ethereum.BlockChain().NewBlock(miner.coinbase, miner.txs) |