aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-09 23:27:43 +0800
committerobscuren <geffobscura@gmail.com>2015-04-09 23:39:02 +0800
commit764a802eaa33892447b82069ee1b1bb5a478837b (patch)
tree02daa2105b89b5b6419521785f6f54d217ed544c /blockpool
parent663fd8f8491fcf10429388237cbb361856c6e49c (diff)
downloaddexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar.gz
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar.bz2
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar.lz
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar.xz
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.tar.zst
dexon-764a802eaa33892447b82069ee1b1bb5a478837b.zip
Disabled TD check
@zelig: Temporarily commented out TD check untill the rest of the network has been fixed.
Diffstat (limited to 'blockpool')
-rw-r--r--blockpool/blockpool.go2
-rw-r--r--blockpool/peers.go2
2 files changed, 4 insertions, 0 deletions
diff --git a/blockpool/blockpool.go b/blockpool/blockpool.go
index 7a65768c7..f442259e0 100644
--- a/blockpool/blockpool.go
+++ b/blockpool/blockpool.go
@@ -790,12 +790,14 @@ func (self *BlockPool) checkTD(nodes ...*node) {
// skip check if queued future block
if n.td != nil && !n.block.Queued() {
plog.DebugDetailf("peer td %v =?= block td %v", n.td, n.block.Td)
+ /* @zelig: Commented out temp untill the rest of the network has been fixed.
if n.td.Cmp(n.block.Td) != 0 {
self.peers.peerError(n.blockBy, ErrIncorrectTD, "on block %x", n.hash)
self.status.lock.Lock()
self.status.badPeers[n.blockBy]++
self.status.lock.Unlock()
}
+ */
}
}
}
diff --git a/blockpool/peers.go b/blockpool/peers.go
index 019399038..e5d6a16d6 100644
--- a/blockpool/peers.go
+++ b/blockpool/peers.go
@@ -473,6 +473,7 @@ func (self *peer) getBlockHashes() bool {
self.addError(ErrInvalidBlock, "%v", err)
self.bp.status.badPeers[self.id]++
} else {
+ /* @zelig: Commented out temp untill the rest of the network has been fixed.
// XXX added currentBlock check (?)
if self.currentBlock != nil && self.currentBlock.Td != nil && !self.currentBlock.Queued() {
plog.DebugDetailf("HeadSection: <%s> inserted %s to blockchain... check TD %v =?= %v", self.id, hex(self.parentHash), self.td, self.currentBlock.Td)
@@ -481,6 +482,7 @@ func (self *peer) getBlockHashes() bool {
self.bp.status.badPeers[self.id]++
}
}
+ */
headKey := self.parentHash
height := self.bp.status.chain[headKey] + 1
self.bp.status.chain[self.currentBlockHash] = height