Skip to content

remoteSealer.notifyWork

Source (upstream pre-purge) Current
File consensus/ethash/sealer.go sealer.go
Symbol remoteSealer.notifyWork remoteSealer.notifyWork
Ref dde2da0ef~1 etc/v1.17.3-full-node

3-way merge — purge → getc ← upstream

pre-purge
// notifyWork notifies all the specified mining endpoints of the availability of
// new work to be processed.
func (s *remoteSealer) notifyWork() {
work := s.currentWork
// Encode the JSON payload of the notification. When NotifyFull is set,
// this is the complete block header, otherwise it is a JSON array.
var blob []byte
if s.ethash.config.NotifyFull {
blob, _ = json.Marshal(s.currentBlock.Header())
} else {
blob, _ = json.Marshal(work)
}
s.reqWG.Add(len(s.notifyURLs))
for _, url := range s.notifyURLs {
go s.sendNotification(s.notifyCtx, url, blob, work)
}
}
core-geth validation — **Identical** ✅ | | | |---|---| | File | [`sealer.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/consensus/ethash/sealer.go) | | Symbol | `remoteSealer.notifyWork` | | Ref | `v1.12.20` |

← Consensus & Ethash