Skip to content

Miner.SetRecommitInterval

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

3-way merge — purge → getc ← upstream

pre-purgefork-only
// SetRecommitInterval sets the interval for miner sealing work recommitting.
func (m *Miner) SetRecommitInterval(interval time.Duration) {
if m.powWorker != nil {
m.powWorker.setRecommitInterval(interval)
}
core-geth validation — +5 -3 | | | |---|---| | File | [`miner.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/miner/miner.go) | | Symbol | `Miner.SetRecommitInterval` | | Ref | `v1.12.20` |
--- a/core-geth/miner/miner.go
+++ b/etc/miner/miner_pow.go
@@ -1,4 +1,6 @@
-// SetRecommitInterval sets the interval for sealing work resubmitting.
-func (miner *Miner) SetRecommitInterval(interval time.Duration) {
-   miner.worker.setRecommitInterval(interval)
+// SetRecommitInterval sets the interval for miner sealing work recommitting.
+func (m *Miner) SetRecommitInterval(interval time.Duration) {
+   if m.powWorker != nil {
+       m.powWorker.setRecommitInterval(interval)
+   }
 }

← Miner