4
4
"crypto/ecdsa"
5
5
"fmt"
6
6
"log"
7
+ "math/big"
7
8
"net/http"
8
9
"os"
9
10
"path"
@@ -116,6 +117,11 @@ var (
116
117
Usage : "Public address for block mining rewards. By default the address of your primary account is used" ,
117
118
Value : "primary" ,
118
119
}
120
+ GasPriceFlag = cli.StringFlag {
121
+ Name : "gasprice" ,
122
+ Usage : "Sets the minimal gasprice when mining transactions" ,
123
+ Value : new (big.Int ).Mul (big .NewInt (10 ), common .Szabo ).String (),
124
+ }
119
125
120
126
UnlockedAccountFlag = cli.StringFlag {
121
127
Name : "unlock" ,
@@ -133,8 +139,8 @@ var (
133
139
Name : "logfile" ,
134
140
Usage : "Send log output to a file" ,
135
141
}
136
- LogLevelFlag = cli.IntFlag {
137
- Name : "loglevel " ,
142
+ VerbosityFlag = cli.IntFlag {
143
+ Name : "verbosity " ,
138
144
Usage : "Logging verbosity: 0-6 (0=silent, 1=error, 2=warn, 3=info, 4=core, 5=debug, 6=debug detail)" ,
139
145
Value : int (logger .InfoLevel ),
140
146
}
@@ -270,7 +276,7 @@ func GetNodeKey(ctx *cli.Context) (key *ecdsa.PrivateKey) {
270
276
271
277
func MakeEthConfig (clientID , version string , ctx * cli.Context ) * eth.Config {
272
278
// Set verbosity on glog
273
- glog .SetV (ctx .GlobalInt (LogLevelFlag .Name ))
279
+ glog .SetV (ctx .GlobalInt (VerbosityFlag .Name ))
274
280
// Set the log type
275
281
//glog.SetToStderr(ctx.GlobalBool(LogToStdErrFlag.Name))
276
282
glog .SetToStderr (true )
@@ -290,7 +296,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
290
296
SkipBcVersionCheck : false ,
291
297
NetworkId : ctx .GlobalInt (NetworkIdFlag .Name ),
292
298
LogFile : ctx .GlobalString (LogFileFlag .Name ),
293
- LogLevel : ctx .GlobalInt (LogLevelFlag .Name ),
299
+ Verbosity : ctx .GlobalInt (VerbosityFlag .Name ),
294
300
LogJSON : ctx .GlobalString (LogJSONFlag .Name ),
295
301
Etherbase : ctx .GlobalString (EtherbaseFlag .Name ),
296
302
MinerThreads : ctx .GlobalInt (MinerThreadsFlag .Name ),
@@ -305,6 +311,7 @@ func MakeEthConfig(clientID, version string, ctx *cli.Context) *eth.Config {
305
311
Shh : ctx .GlobalBool (WhisperEnabledFlag .Name ),
306
312
Dial : true ,
307
313
BootNodes : ctx .GlobalString (BootnodesFlag .Name ),
314
+ GasPrice : common .String2Big (ctx .GlobalString (GasPriceFlag .Name )),
308
315
}
309
316
310
317
}
0 commit comments