miner, cmd/geth: miner will not ignored owned account transactions

Miner does not ignore low gas txs from accounts that are owned.
This commit is contained in:
obscuren
2015-05-11 21:47:34 +02:00
parent 0bedf1c376
commit 97dd4551ef
2 changed files with 44 additions and 29 deletions

View File

@ -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))