diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-05 21:14:06 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-05 21:14:06 +0800 |
commit | 5b9a0e711800013a27be73cf963823b61e1ef727 (patch) | |
tree | 86c7562a9e679ac274e3c801744b17bd9637b671 /blockpool | |
parent | 50edd4243e6eda1e4058209d0222443091a1ac50 (diff) | |
download | go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar.gz go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar.bz2 go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar.lz go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar.xz go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.tar.zst go-tangerine-5b9a0e711800013a27be73cf963823b61e1ef727.zip |
Disabled PoW check
@zelig we need to discuss this
Diffstat (limited to 'blockpool')
-rw-r--r-- | blockpool/blockpool.go | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go index 3ae4e0620..00dad3330 100644 --- a/blockpool/blockpool.go +++ b/blockpool/blockpool.go @@ -687,17 +687,20 @@ func (self *BlockPool) AddBlock(block *types.Block, peerId string) { return } - // validate block for PoW - if !self.verifyPoW(block) { - plog.Warnf("AddBlock: invalid PoW on block %s from peer <%s> (head: %s)", hex(hash), peerId, hex(sender.currentBlockHash)) - sender.addError(ErrInvalidPoW, "%x", hash) + /* + @zelig needs discussing + // validate block for PoW + if !self.verifyPoW(block) { + plog.Warnf("AddBlock: invalid PoW on block %s from peer <%s> (head: %s)", hex(hash), peerId, hex(sender.currentBlockHash)) + sender.addError(ErrInvalidPoW, "%x", hash) - self.status.lock.Lock() - self.status.badPeers[peerId]++ - self.status.lock.Unlock() + self.status.lock.Lock() + self.status.badPeers[peerId]++ + self.status.lock.Unlock() - return - } + return + } + */ node.block = block node.blockBy = peerId |