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
4c8c115a
Commit
4c8c115a
authored
Jan 06, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/peerserver: use NoDial, don't use seed peers
parent
545e1469
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
main.go
cmd/peerserver/main.go
+2
-13
No files found.
cmd/peerserver/main.go
View file @
4c8c115a
...
@@ -18,9 +18,7 @@ package main
...
@@ -18,9 +18,7 @@ package main
import
(
import
(
"crypto/elliptic"
"crypto/elliptic"
"fmt"
"log"
"log"
"net"
"os"
"os"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto"
...
@@ -38,19 +36,10 @@ func main() {
...
@@ -38,19 +36,10 @@ func main() {
Identity
:
p2p
.
NewSimpleClientIdentity
(
"Ethereum(G)"
,
"0.1"
,
"Peer Server Two"
,
marshaled
),
Identity
:
p2p
.
NewSimpleClientIdentity
(
"Ethereum(G)"
,
"0.1"
,
"Peer Server Two"
,
marshaled
),
ListenAddr
:
":30301"
,
ListenAddr
:
":30301"
,
NAT
:
p2p
.
UPNP
(),
NAT
:
p2p
.
UPNP
(),
NoDial
:
true
,
}
}
if
err
:=
srv
.
Start
();
err
!=
nil
{
if
err
:=
srv
.
Start
();
err
!=
nil
{
fmt
.
Println
(
"could not start server:"
,
err
)
log
.
Fatal
(
"could not start server:"
,
err
)
os
.
Exit
(
1
)
}
}
// add seed peers
seed
,
err
:=
net
.
ResolveTCPAddr
(
"tcp"
,
"poc-8.ethdev.com:30303"
)
if
err
!=
nil
{
fmt
.
Println
(
"couldn't resolve:"
,
err
)
}
else
{
srv
.
SuggestPeer
(
seed
.
IP
,
seed
.
Port
,
nil
)
}
select
{}
select
{}
}
}
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