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
e7b33e9a
Commit
e7b33e9a
authored
Mar 02, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move p2p.MakeName to ethutil.MakeVersion
parent
fb248823
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
13 deletions
+8
-13
main.go
cmd/ethereum/main.go
+1
-2
main.go
cmd/mist/main.go
+2
-2
common.go
ethutil/common.go
+4
-0
server.go
p2p/server.go
+1
-9
No files found.
cmd/ethereum/main.go
View file @
e7b33e9a
...
...
@@ -31,7 +31,6 @@ import (
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/state"
)
...
...
@@ -62,7 +61,7 @@ func main() {
utils
.
InitConfig
(
VmType
,
ConfigFile
,
Datadir
,
"ETH"
)
ethereum
,
err
:=
eth
.
New
(
&
eth
.
Config
{
Name
:
p2p
.
MakeName
(
ClientIdentifier
,
Version
),
Name
:
ethutil
.
MakeVersion
(
ClientIdentifier
,
Version
),
KeyStore
:
KeyStore
,
DataDir
:
Datadir
,
LogFile
:
LogFile
,
...
...
cmd/mist/main.go
View file @
e7b33e9a
...
...
@@ -28,8 +28,8 @@ import (
"github.com/ethereum/go-ethereum/cmd/utils"
"github.com/ethereum/go-ethereum/eth"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/ui/qt/webengine"
"github.com/obscuren/qml"
)
...
...
@@ -52,7 +52,7 @@ func run() error {
config
:=
utils
.
InitConfig
(
VmType
,
ConfigFile
,
Datadir
,
"ETH"
)
ethereum
,
err
:=
eth
.
New
(
&
eth
.
Config
{
Name
:
p2p
.
MakeName
(
ClientIdentifier
,
Version
),
Name
:
ethutil
.
MakeVersion
(
ClientIdentifier
,
Version
),
KeyStore
:
KeyStore
,
DataDir
:
Datadir
,
LogFile
:
LogFile
,
...
...
ethutil/common.go
View file @
e7b33e9a
...
...
@@ -13,6 +13,10 @@ import (
"github.com/kardianos/osext"
)
func
MakeVersion
(
name
,
version
string
)
string
{
return
fmt
.
Sprintf
(
"%s/v%s/%s/%s"
,
name
,
version
,
runtime
.
GOOS
,
runtime
.
Version
())
}
func
DefaultAssetPath
()
string
{
var
assetPath
string
pwd
,
_
:=
os
.
Getwd
()
...
...
p2p/server.go
View file @
e7b33e9a
...
...
@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"net"
"runtime"
"sync"
"time"
...
...
@@ -24,13 +23,6 @@ const (
var
srvlog
=
logger
.
NewLogger
(
"P2P Server"
)
var
srvjslog
=
logger
.
NewJsonLogger
()
// MakeName creates a node name that follows the ethereum convention
// for such names. It adds the operation system name and Go runtime version
// the name.
func
MakeName
(
name
,
version
string
)
string
{
return
fmt
.
Sprintf
(
"%s/v%s/%s/%s"
,
name
,
version
,
runtime
.
GOOS
,
runtime
.
Version
())
}
// Server manages all peer connections.
//
// The fields of Server are used as configuration parameters.
...
...
@@ -45,7 +37,7 @@ type Server struct {
MaxPeers
int
// Name sets the node name of this server.
// Use
MakeName
to create a name that follows existing conventions.
// Use
ethutil.MakeVersion
to create a name that follows existing conventions.
Name
string
// Bootstrap nodes are used to establish connectivity
...
...
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