aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/admin.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-05-12 03:47:34 +0800
committerobscuren <geffobscura@gmail.com>2015-05-12 03:47:34 +0800
commit97dd4551ef757c33fa33b5c06a0b15582e6a8af3 (patch)
treebe96435bcccaf6ac86308f98a2516af31ba1563c /cmd/geth/admin.go
parent0bedf1c3760a1042171fdfde0f119acb683c43ec (diff)
downloaddexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar.gz
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar.bz2
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar.lz
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar.xz
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.tar.zst
dexon-97dd4551ef757c33fa33b5c06a0b15582e6a8af3.zip
miner, cmd/geth: miner will not ignored owned account transactions
Miner does not ignore low gas txs from accounts that are owned.
Diffstat (limited to 'cmd/geth/admin.go')
-rw-r--r--cmd/geth/admin.go17
1 files changed, 13 insertions, 4 deletions
diff --git a/cmd/geth/admin.go b/cmd/geth/admin.go
index 17d711297..b0cb7507a 100644
--- a/cmd/geth/admin.go
+++ b/cmd/geth/admin.go
@@ -275,10 +275,19 @@ func (js *jsre) verbosity(call otto.FunctionCall) otto.Value {
}
func (js *jsre) startMining(call otto.FunctionCall) otto.Value {
- threads, err := call.Argument(0).ToInteger()
- if err != nil {
- fmt.Println(err)
- return otto.FalseValue()
+ var (
+ threads int64
+ err error
+ )
+
+ if len(call.ArgumentList) > 0 {
+ threads, err = call.Argument(0).ToInteger()
+ if err != nil {
+ fmt.Println(err)
+ return otto.FalseValue()
+ }
+ } else {
+ threads = 4
}
err = js.ethereum.StartMining(int(threads))