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
8b4ed8c5
Commit
8b4ed8c5
authored
May 12, 2014
by
Maran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly exchange peer capabilities between peers
parent
4eb3ad19
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
ethereum.go
ethereum.go
+4
-0
peer.go
peer.go
+1
-1
No files found.
ethereum.go
View file @
8b4ed8c5
...
...
@@ -122,6 +122,10 @@ func (s *Ethereum) TxPool() *ethchain.TxPool {
return
s
.
txPool
}
func
(
s
*
Ethereum
)
ServerCaps
()
Caps
{
return
s
.
serverCaps
}
func
(
s
*
Ethereum
)
AddPeer
(
conn
net
.
Conn
)
{
peer
:=
NewPeer
(
conn
,
s
,
true
)
...
...
peer.go
View file @
8b4ed8c5
...
...
@@ -146,6 +146,7 @@ func NewPeer(conn net.Conn, ethereum *Ethereum, inbound bool) *Peer {
port
:
30303
,
pubkey
:
pubkey
,
blocksRequested
:
10
,
caps
:
ethereum
.
ServerCaps
(),
}
}
...
...
@@ -573,7 +574,6 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
}
// Catch up with the connected peer
// p.CatchupWithPeer(p.ethereum.BlockChain().CurrentBlock.Hash())
p
.
SyncWithBlocks
()
// Set the peer's caps
...
...
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