diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-20 22:18:07 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-20 22:18:07 +0800 |
commit | 75625801f597061076d1e5863f97c9ea12aa10e4 (patch) | |
tree | f45334ddc09a191c8dfe4e75f98f736bf67979f6 /xeth | |
parent | ea9a549bbdc8377bca73f1417f2dc4a18396a382 (diff) | |
parent | a59cd94625f589bb167be7a9c4588ff959dcfc00 (diff) | |
download | go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar.gz go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar.bz2 go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar.lz go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar.xz go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.tar.zst go-tangerine-75625801f597061076d1e5863f97c9ea12aa10e4.zip |
fixed merge
Diffstat (limited to 'xeth')
-rw-r--r-- | xeth/xeth.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xeth/xeth.go b/xeth/xeth.go index 67dac948c..f3569e454 100644 --- a/xeth/xeth.go +++ b/xeth/xeth.go @@ -103,6 +103,17 @@ func (self *XEth) IsMining() bool { return self.miner.Mining() } +func (self *XEth) SetMining(shouldmine bool) bool { + ismining := self.miner.Mining() + if shouldmine && !ismining { + self.miner.Start() + } + if ismining && !shouldmine { + self.miner.Stop() + } + return self.miner.Mining() +} + func (self *XEth) IsListening() bool { return self.eth.IsListening() } |