diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-29 18:42:47 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-06-29 19:31:49 +0800 |
commit | b39042db5672e830ddec41ea97c642d93be61c30 (patch) | |
tree | 1c0a9ac2c1c6b616b1ea14e9b4cd1e847472e6d7 /miner | |
parent | d1e93db3ebc218044339a6c5c95b4907e6351ede (diff) | |
download | go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar.gz go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar.bz2 go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar.lz go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar.xz go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.tar.zst go-tangerine-b39042db5672e830ddec41ea97c642d93be61c30.zip |
core, miner: implemented canary
Diffstat (limited to 'miner')
-rw-r--r-- | miner/worker.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/miner/worker.go b/miner/worker.go index ab01ba09e..1e5d47965 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -267,6 +267,12 @@ func (self *worker) wait() { func (self *worker) push() { if atomic.LoadInt32(&self.mining) == 1 { + if core.Canary(self.current.state) { + glog.Infoln("Toxicity levels rising to deadly levels. Your canary has died. You can go back or continue down the mineshaft --more--") + glog.Infoln("You turn back and abort mining") + return + } + self.current.state.Sync() self.current.block.SetRoot(self.current.state.Root()) |