aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethereum/js.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-12 06:56:48 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-12 06:56:48 +0800
commit6af078bd8c9451f9c12cab371bf7bd2569f575a3 (patch)
tree08d6b802539aadd66fdd27236847de1f966318d2 /cmd/ethereum/js.go
parent5a9f712144058c576d14b0d27ff2d2d270cd6d27 (diff)
parentd5aaf413e0307b07597e48a548f0219f4ea8c3be (diff)
downloaddexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar.gz
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar.bz2
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar.lz
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar.xz
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.tar.zst
dexon-6af078bd8c9451f9c12cab371bf7bd2569f575a3.zip
Merge pull request #462 from fjl/miner-coinbase
miner: provide coinbase when starting the miner
Diffstat (limited to 'cmd/ethereum/js.go')
-rw-r--r--cmd/ethereum/js.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/ethereum/js.go b/cmd/ethereum/js.go
index 5432fb9b1..3b98b588e 100644
--- a/cmd/ethereum/js.go
+++ b/cmd/ethereum/js.go
@@ -249,12 +249,14 @@ func (self *jsre) dump(call otto.FunctionCall) otto.Value {
}
func (self *jsre) stopMining(call otto.FunctionCall) otto.Value {
- self.xeth.Miner().Stop()
+ self.ethereum.StopMining()
return otto.TrueValue()
}
func (self *jsre) startMining(call otto.FunctionCall) otto.Value {
- self.xeth.Miner().Start()
+ if err := self.ethereum.StartMining(); err != nil {
+ return otto.FalseValue()
+ }
return otto.TrueValue()
}