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
278183c7
Commit
278183c7
authored
May 26, 2015
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth, p2p: start the p2p server even if maxpeers == 0
parent
eae09275
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
backend.go
eth/backend.go
+3
-7
server.go
p2p/server.go
+0
-3
No files found.
eth/backend.go
View file @
278183c7
...
@@ -449,14 +449,10 @@ func (s *Ethereum) Start() error {
...
@@ -449,14 +449,10 @@ func (s *Ethereum) Start() error {
ClientString
:
s
.
net
.
Name
,
ClientString
:
s
.
net
.
Name
,
ProtocolVersion
:
ProtocolVersion
,
ProtocolVersion
:
ProtocolVersion
,
})
})
err
:=
s
.
net
.
Start
()
if
s
.
net
.
MaxPeers
>
0
{
if
err
!=
nil
{
err
:=
s
.
net
.
Start
()
return
err
if
err
!=
nil
{
return
err
}
}
}
// periodically flush databases
// periodically flush databases
go
s
.
syncDatabases
()
go
s
.
syncDatabases
()
...
...
p2p/server.go
View file @
278183c7
...
@@ -275,9 +275,6 @@ func (srv *Server) Start() (err error) {
...
@@ -275,9 +275,6 @@ func (srv *Server) Start() (err error) {
if
srv
.
PrivateKey
==
nil
{
if
srv
.
PrivateKey
==
nil
{
return
fmt
.
Errorf
(
"Server.PrivateKey must be set to a non-nil key"
)
return
fmt
.
Errorf
(
"Server.PrivateKey must be set to a non-nil key"
)
}
}
if
srv
.
MaxPeers
<=
0
{
return
fmt
.
Errorf
(
"Server.MaxPeers must be > 0"
)
}
if
srv
.
newTransport
==
nil
{
if
srv
.
newTransport
==
nil
{
srv
.
newTransport
=
newRLPX
srv
.
newTransport
=
newRLPX
}
}
...
...
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