Skip to content

Miner.SetEtherbase

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

3-way merge — purge → getc ← upstream

pre-purgefork-only
// SetEtherbase sets the etherbase (coinbase) address for mining rewards.
func (m *Miner) SetEtherbase(addr common.Address) {
if m.powWorker != nil {
m.powWorker.setEtherbase(addr)
}
core-geth validation — +5 -2 | | | |---|---| | File | [`miner.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/miner/miner.go) | | Symbol | `Miner.SetEtherbase` | | Ref | `v1.12.20` |
--- a/core-geth/miner/miner.go
+++ b/etc/miner/miner_pow.go
@@ -1,3 +1,6 @@
-func (miner *Miner) SetEtherbase(addr common.Address) {
-   miner.worker.setEtherbase(addr)
+// SetEtherbase sets the etherbase (coinbase) address for mining rewards.
+func (m *Miner) SetEtherbase(addr common.Address) {
+   if m.powWorker != nil {
+       m.powWorker.setEtherbase(addr)
+   }
 }

← Miner