aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-05-09 19:13:16 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-05-09 19:13:16 +0800
commite289b0a1c12868267dac89287a0e36b7f89b67f6 (patch)
tree79b2afae15c44422fa903251a8872f91324c48a0 /cmd/geth
parentc8fc4cebe63073fd77d5f553a4f0cec36a4ccb4b (diff)
parent658ac3c257e0d97c44cf7924c84c050032256d61 (diff)
downloadgo-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.gz
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.bz2
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.lz
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.xz
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.tar.zst
go-tangerine-e289b0a1c12868267dac89287a0e36b7f89b67f6.zip
Merge pull request #888 from obscuren/developv0.9.18
miner, flags: Configurable gas price & log flag change
Diffstat (limited to 'cmd/geth')
-rw-r--r--cmd/geth/admin.go12
-rw-r--r--cmd/geth/main.go5
2 files changed, 15 insertions, 2 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..723353b0b 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.18"
)
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,