Skip to content

remoteSealer.sendNotification

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

3-way merge — purge → getc ← upstream

pre-purge
func (s *remoteSealer) sendNotification(ctx context.Context, url string, json []byte, work [4]string) {
defer s.reqWG.Done()
req, err := http.NewRequest(http.MethodPost, url, bytes.NewReader(json))
if err != nil {
s.ethash.config.Log.Warn("Can't create remote miner notification", "err", err)
return
}
ctx, cancel := context.WithTimeout(ctx, remoteSealerTimeout)
defer cancel()
req = req.WithContext(ctx)
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
s.ethash.config.Log.Warn("Failed to notify remote miner", "err", err)
} else {
s.ethash.config.Log.Trace("Notified remote miner", "miner", url, "hash", work[0], "target", work[2])
resp.Body.Close()
}
}
core-geth validation — **Identical** ✅ | | | |---|---| | File | [`sealer.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/consensus/ethash/sealer.go) | | Symbol | `remoteSealer.sendNotification` | | Ref | `v1.12.20` |

← Consensus & Ethash