Skip to content

Miner.Mining

Source (upstream pre-purge) Current
File miner/miner.go miner_pow.go
Symbol Miner.Mining Miner.Mining
Ref dde2da0ef~1 etc/v1.17.3-full-node

3-way merge — purge → getc ← upstream

pre-purgefork-only
// Mining returns whether the miner is currently mining.
func (m *Miner) Mining() bool {
if m.powWorker != nil {
return m.powWorker.isRunning()
}
return false
core-geth validation — +6 -2 | | | |---|---| | File | [`miner.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/miner/miner.go) | | Symbol | `Miner.Mining` | | Ref | `v1.12.20` |
--- a/core-geth/miner/miner.go
+++ b/etc/miner/miner_pow.go
@@ -1,3 +1,7 @@
-func (miner *Miner) Mining() bool {
-   return miner.worker.isRunning()
+// Mining returns whether the miner is currently mining.
+func (m *Miner) Mining() bool {
+   if m.powWorker != nil {
+       return m.powWorker.isRunning()
+   }
+   return false
 }

← Miner