Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
d1d2b660
Commit
d1d2b660
authored
Jul 29, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prot
parent
8e7c4f91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
peer.go
peer.go
+11
-10
No files found.
peer.go
View file @
d1d2b660
...
@@ -22,7 +22,7 @@ const (
...
@@ -22,7 +22,7 @@ const (
// The size of the output buffer for writing messages
// The size of the output buffer for writing messages
outputBufferSize
=
50
outputBufferSize
=
50
// Current protocol version
// Current protocol version
ProtocolVersion
=
2
3
ProtocolVersion
=
2
5
// Interval for ping/pong message
// Interval for ping/pong message
pingPongTimer
=
2
*
time
.
Second
pingPongTimer
=
2
*
time
.
Second
)
)
...
@@ -436,19 +436,20 @@ func (p *Peer) HandleInbound() {
...
@@ -436,19 +436,20 @@ func (p *Peer) HandleInbound() {
if
err
!=
nil
{
if
err
!=
nil
{
// If the parent is unknown try to catch up with this peer
// If the parent is unknown try to catch up with this peer
if
ethchain
.
IsParentErr
(
err
)
{
if
ethchain
.
IsParentErr
(
err
)
{
/*
b
:=
ethchain
.
NewBlockFromRlpValue
(
msg
.
Data
.
Get
(
0
))
b := ethchain.NewBlockFromRlpValue(msg.Data.Get(0))
peerlogger
.
Infof
(
"Attempting to catch (%x). Parent unknown
\n
"
,
b
.
Hash
())
p
.
catchingUp
=
false
peerlogger.Infof("Attempting to catch (%x). Parent known\n", b.Hash())
p
.
CatchupWithPeer
(
b
.
Hash
())
p.catchingUp = false
p.CatchupWithPeer(b.Hash()
)
peerlogger
.
Infoln
(
b
)
peerlogger.Infoln(b)
/*
peerlogger.Infoln("Attempting to catch. Parent known")
p.catchingUp = false
p.CatchupWithPeer(p.ethereum.BlockChain().CurrentBlock.Hash())
*/
*/
peerlogger
.
Infoln
(
"Attempting to catch. Parent known"
)
p
.
catchingUp
=
false
p
.
CatchupWithPeer
(
p
.
ethereum
.
BlockChain
()
.
CurrentBlock
.
Hash
())
}
else
if
ethchain
.
IsValidationErr
(
err
)
{
}
else
if
ethchain
.
IsValidationErr
(
err
)
{
fmt
.
Println
(
"Err:"
,
err
)
fmt
.
Println
(
"Err:"
,
err
)
p
.
catchingUp
=
false
p
.
catchingUp
=
false
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment