aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-15 02:50:37 +0800
committerobscuren <geffobscura@gmail.com>2014-05-15 02:50:37 +0800
commit65f570271cc6bf2ea73a7ba2bf83d92a1ba42986 (patch)
tree16938dcc701ff99c7bdcc7f8ecded394858b709c /peer.go
parenta6b9ea05e8dc291f69f9384071864a475e7872e6 (diff)
downloaddexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar.gz
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar.bz2
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar.lz
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar.xz
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.tar.zst
dexon-65f570271cc6bf2ea73a7ba2bf83d92a1ba42986.zip
Fixed catching up
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/peer.go b/peer.go
index 3e1e4a181..4093a4902 100644
--- a/peer.go
+++ b/peer.go
@@ -321,8 +321,6 @@ func (p *Peer) HandleInbound() {
// We don't have this block, but we do have a block with the same prevHash, diversion time!
if p.ethereum.StateManager().BlockChain().HasBlockWithPrevHash(block.PrevHash) {
if p.ethereum.StateManager().BlockChain().FindCanonicalChainFromMsg(msg, block.PrevHash) {
- p.catchingUp = false
-
return
}
}
@@ -373,12 +371,11 @@ func (p *Peer) HandleInbound() {
}
}
- if lastBlock != nil && err == nil {
- fmt.Println("Did proc. no err")
- } else {
- fmt.Println("other")
+ if msg.Data.Len() == 0 {
+ // Set catching up to false if
+ // the peer has nothing left to give
+ p.catchingUp = false
}
- fmt.Println("length of chain", msg.Data.Len())
case ethwire.MsgTxTy:
// If the message was a transaction queue the transaction
// in the TxPool where it will undergo validation and