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
cb1fa523
Commit
cb1fa523
authored
May 09, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd/geth, cmd/mist, eth, flags: renamed loglevel to verbosity
parent
c8fc4ceb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
13 deletions
+25
-13
main.go
cmd/geth/main.go
+2
-1
main.go
cmd/mist/main.go
+1
-1
flags.go
cmd/utils/flags.go
+11
-4
backend.go
eth/backend.go
+11
-7
No files found.
cmd/geth/main.go
View file @
cb1fa523
...
...
@@ -244,6 +244,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils
.
MaxPeersFlag
,
utils
.
MaxPendingPeersFlag
,
utils
.
EtherbaseFlag
,
utils
.
GasPriceFlag
,
utils
.
MinerThreadsFlag
,
utils
.
MiningEnabledFlag
,
utils
.
NATFlag
,
...
...
@@ -258,7 +259,7 @@ JavaScript API. See https://github.com/ethereum/go-ethereum/wiki/Javascipt-Conso
utils
.
ProtocolVersionFlag
,
utils
.
NetworkIdFlag
,
utils
.
RPCCORSDomainFlag
,
utils
.
LogLevel
Flag
,
utils
.
Verbosity
Flag
,
utils
.
BacktraceAtFlag
,
utils
.
LogToStdErrFlag
,
utils
.
LogVModuleFlag
,
...
...
cmd/mist/main.go
View file @
cb1fa523
...
...
@@ -73,7 +73,7 @@ func init() {
utils
.
DataDirFlag
,
utils
.
ListenPortFlag
,
utils
.
LogFileFlag
,
utils
.
LogLevel
Flag
,
utils
.
Verbosity
Flag
,
utils
.
MaxPeersFlag
,
utils
.
MaxPendingPeersFlag
,
utils
.
MinerThreadsFlag
,
...
...
cmd/utils/flags.go
View file @
cb1fa523
...
...
@@ -4,6 +4,7 @@ import (
"crypto/ecdsa"
"fmt"
"log"
"math/big"
"net/http"
"os"
"path"
...
...
@@ -116,6 +117,11 @@ var (
Usage
:
"Public address for block mining rewards. By default the address of your primary account is used"
,
Value
:
"primary"
,
}
GasPriceFlag
=
cli
.
StringFlag
{
Name
:
"gasprice"
,
Usage
:
"Sets the minimal gasprice when mining transactions"
,
Value
:
new
(
big
.
Int
)
.
Mul
(
big
.
NewInt
(
10
),
common
.
Szabo
)
.
String
(),
}
UnlockedAccountFlag
=
cli
.
StringFlag
{
Name
:
"unlock"
,
...
...
@@ -133,8 +139,8 @@ var (
Name
:
"logfile"
,
Usage
:
"Send log output to a file"
,
}
LogLevel
Flag
=
cli
.
IntFlag
{
Name
:
"
loglevel
"
,
Verbosity
Flag
=
cli
.
IntFlag
{
Name
:
"
verbosity
"
,
Usage
:
"Logging verbosity: 0-6 (0=silent, 1=error, 2=warn, 3=info, 4=core, 5=debug, 6=debug detail)"
,
Value
:
int
(
logger
.
InfoLevel
),
}
...
...
@@ -270,7 +276,7 @@ func GetNodeKey(ctx *cli.Context) (key *ecdsa.PrivateKey) {
func
MakeEthConfig
(
clientID
,
version
string
,
ctx
*
cli
.
Context
)
*
eth
.
Config
{
// Set verbosity on glog
glog
.
SetV
(
ctx
.
GlobalInt
(
LogLevel
Flag
.
Name
))
glog
.
SetV
(
ctx
.
GlobalInt
(
Verbosity
Flag
.
Name
))
// Set the log type
//glog.SetToStderr(ctx.GlobalBool(LogToStdErrFlag.Name))
glog
.
SetToStderr
(
true
)
...
...
@@ -290,7 +296,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
SkipBcVersionCheck
:
false
,
NetworkId
:
ctx
.
GlobalInt
(
NetworkIdFlag
.
Name
),
LogFile
:
ctx
.
GlobalString
(
LogFileFlag
.
Name
),
LogLevel
:
ctx
.
GlobalInt
(
LogLevel
Flag
.
Name
),
Verbosity
:
ctx
.
GlobalInt
(
Verbosity
Flag
.
Name
),
LogJSON
:
ctx
.
GlobalString
(
LogJSONFlag
.
Name
),
Etherbase
:
ctx
.
GlobalString
(
EtherbaseFlag
.
Name
),
MinerThreads
:
ctx
.
GlobalInt
(
MinerThreadsFlag
.
Name
),
...
...
@@ -305,6 +311,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
Shh
:
ctx
.
GlobalBool
(
WhisperEnabledFlag
.
Name
),
Dial
:
true
,
BootNodes
:
ctx
.
GlobalString
(
BootnodesFlag
.
Name
),
GasPrice
:
common
.
String2Big
(
ctx
.
GlobalString
(
GasPriceFlag
.
Name
)),
}
}
...
...
eth/backend.go
View file @
cb1fa523
...
...
@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"io/ioutil"
"math/big"
"os"
"path"
"path/filepath"
...
...
@@ -53,12 +54,12 @@ type Config struct {
BlockChainVersion
int
SkipBcVersionCheck
bool
// e.g. blockchain export
DataDir
string
LogFile
string
LogLevel
int
LogJSON
string
VmDebug
bool
NatSpec
bool
DataDir
string
LogFile
string
Verbosity
int
LogJSON
string
VmDebug
bool
NatSpec
bool
MaxPeers
int
MaxPendingPeers
int
...
...
@@ -76,6 +77,7 @@ type Config struct {
Dial
bool
Etherbase
string
GasPrice
*
big
.
Int
MinerThreads
int
AccountManager
*
accounts
.
Manager
...
...
@@ -200,7 +202,7 @@ type Ethereum struct {
func
New
(
config
*
Config
)
(
*
Ethereum
,
error
)
{
// Bootstrap database
logger
.
New
(
config
.
DataDir
,
config
.
LogFile
,
config
.
LogLevel
)
logger
.
New
(
config
.
DataDir
,
config
.
LogFile
,
config
.
Verbosity
)
if
len
(
config
.
LogJSON
)
>
0
{
logger
.
NewJSONsystem
(
config
.
DataDir
,
config
.
LogJSON
)
}
...
...
@@ -266,6 +268,8 @@ func New(config *Config) (*Ethereum, error) {
eth
.
blockProcessor
=
core
.
NewBlockProcessor
(
stateDb
,
extraDb
,
eth
.
pow
,
eth
.
txPool
,
eth
.
chainManager
,
eth
.
EventMux
())
eth
.
chainManager
.
SetProcessor
(
eth
.
blockProcessor
)
eth
.
miner
=
miner
.
New
(
eth
,
eth
.
pow
,
config
.
MinerThreads
)
eth
.
miner
.
SetGasPrice
(
config
.
GasPrice
)
eth
.
protocolManager
=
NewProtocolManager
(
config
.
ProtocolVersion
,
config
.
NetworkId
,
eth
.
eventMux
,
eth
.
txPool
,
eth
.
chainManager
,
eth
.
downloader
)
if
config
.
Shh
{
eth
.
whisper
=
whisper
.
New
()
...
...
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