aboutsummaryrefslogtreecommitdiffstats
path: root/peer.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-13 23:45:39 +0800
committerobscuren <geffobscura@gmail.com>2014-07-13 23:45:39 +0800
commitee3ba0b1d611401864bf0a646e9608d5ba03be34 (patch)
tree0a076a927a6747b57e32e29e90f9b583b1098a52 /peer.go
parent54715586ab147a62342a9462f3a73cc2f750d148 (diff)
downloadgo-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar.gz
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar.bz2
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar.lz
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar.xz
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.tar.zst
go-tangerine-ee3ba0b1d611401864bf0a646e9608d5ba03be34.zip
Catch up per 10
Diffstat (limited to 'peer.go')
-rw-r--r--peer.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/peer.go b/peer.go
index 13b81d1a8..0a4f08af5 100644
--- a/peer.go
+++ b/peer.go
@@ -419,6 +419,16 @@ func (p *Peer) HandleInbound() {
if err != nil {
// If the parent is unknown try to catch up with this peer
if ethchain.IsParentErr(err) {
+ /*
+ b := ethchain.NewBlockFromRlpValue(msg.Data.Get(0))
+
+ peerlogger.Infof("Attempting to catch (%x). Parent known\n", b.Hash())
+ p.catchingUp = false
+
+ p.CatchupWithPeer(b.Hash())
+
+ peerlogger.Infoln(b)
+ */
peerlogger.Infoln("Attempting to catch. Parent known")
p.catchingUp = false
p.CatchupWithPeer(p.ethereum.BlockChain().CurrentBlock.Hash())
@@ -744,7 +754,7 @@ func (p *Peer) CatchupWithPeer(blockHash []byte) {
if !p.catchingUp {
// Make sure nobody else is catching up when you want to do this
p.catchingUp = true
- msg := ethwire.NewMessage(ethwire.MsgGetChainTy, []interface{}{blockHash, uint64(50)})
+ msg := ethwire.NewMessage(ethwire.MsgGetChainTy, []interface{}{blockHash, uint64(10)})
p.QueueMessage(msg)
peerlogger.DebugDetailf("Requesting blockchain %x... from peer %s\n", p.ethereum.BlockChain().CurrentBlock.Hash()[:4], p.conn.RemoteAddr())