aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorDaniel A. Nagy <nagy.da@gmail.com>2015-05-11 18:47:14 +0800
committerDaniel A. Nagy <nagy.da@gmail.com>2015-05-11 18:47:14 +0800
commita9e1d38612cfde56c285a5de5b5bfe5326bdc9b5 (patch)
tree6c16d3e2b216fdf0027a477a8975c9052930e34a /cmd
parent1fe70a66ba2ef0f148affa7a72b4e65023474859 (diff)
parent5176fbc6faaa5e7f0305ad7f2b896c092781deaa (diff)
downloadgo-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar.gz
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar.bz2
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar.lz
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar.xz
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.tar.zst
go-tangerine-a9e1d38612cfde56c285a5de5b5bfe5326bdc9b5.zip
Merge branch 'develop' of github.com:ethereum/go-ethereum into develop
Conflicts: rpc/jeth.go
Diffstat (limited to 'cmd')
-rw-r--r--cmd/geth/admin.go12
-rw-r--r--cmd/geth/main.go5
-rw-r--r--cmd/mist/main.go4
-rw-r--r--cmd/utils/flags.go15
4 files changed, 28 insertions, 8 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index 49e2dc6f8..2b9956638 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -70,6 +70,7 @@ func (js *jsre) adminBindings() {
miner.Set("stop", js.stopMining)
miner.Set("hashrate", js.hashrate)
miner.Set("setExtra", js.setExtra)
+ miner.Set("setGasPrice", js.setGasPrice)
admin.Set("debug", struct{}{})
t, _ = admin.Get("debug")
@@ -236,6 +237,17 @@ func (js *jsre) setExtra(call otto.FunctionCall) otto.Value {
return otto.UndefinedValue()
}
+func (js *jsre) setGasPrice(call otto.FunctionCall) otto.Value {
+ gasPrice, err := call.Argument(0).ToString()
+ if err != nil {
+ fmt.Println(err)
+ return otto.UndefinedValue()
+ }
+
+ js.ethereum.Miner().SetGasPrice(common.String2Big(gasPrice))
+ return otto.UndefinedValue()
+}
+
func (js *jsre) hashrate(otto.FunctionCall) otto.Value {
return js.re.ToVal(js.ethereum.Miner().HashRate())
}
diff --git a/cmd/geth/main.go b/cmd/geth/main.go
index fd6925e6d..fd7aae4c2 100644
--- a/cmd/geth/main.go
+++ b/cmd/geth/main.go
@@ -51,7 +51,7 @@ import _ "net/http/pprof"
const (
ClientIdentifier = "Geth"
- Version = "0.9.17"
+ Version = "0.9.19"
)
var (
@@ -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.LogLevelFlag,
+ utils.VerbosityFlag,
utils.BacktraceAtFlag,
utils.LogToStdErrFlag,
utils.LogVModuleFlag,
diff --git a/cmd/mist/main.go b/cmd/mist/main.go
index 9d92cc175..4b55b3026 100644
--- a/cmd/mist/main.go
+++ b/cmd/mist/main.go
@@ -37,7 +37,7 @@ import (
const (
ClientIdentifier = "Mist"
- Version = "0.9.0"
+ Version = "0.9.19"
)
var (
@@ -73,7 +73,7 @@ func init() {
utils.DataDirFlag,
utils.ListenPortFlag,
utils.LogFileFlag,
- utils.LogLevelFlag,
+ utils.VerbosityFlag,
utils.MaxPeersFlag,
utils.MaxPendingPeersFlag,
utils.MinerThreadsFlag,
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index b18d9851f..dd3b6c8a2 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -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",
}
- LogLevelFlag = cli.IntFlag{
- Name: "loglevel",
+ VerbosityFlag = 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(LogLevelFlag.Name))
+ glog.SetV(ctx.GlobalInt(VerbosityFlag.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(LogLevelFlag.Name),
+ Verbosity: ctx.GlobalInt(VerbosityFlag.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)),
}
}