Skip to content

API.SubmitHashrate

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

3-way merge — purge → getc ← upstream

pre-purge
// SubmitHashrate can be used for remote miners to submit their hash rate.
// This enables the node to report the combined hash rate of all miners
// which submit work through this node.
//
// It accepts the miner hash rate and an identifier which must be unique
// between nodes.
func (api *API) SubmitHashrate(rate hexutil.Uint64, id common.Hash) bool {
if api.ethash.remote == nil {
return false
}
var done = make(chan struct{}, 1)
select {
case api.ethash.remote.submitRateCh <- &hashrate{done: done, rate: uint64(rate), id: id}:
case <-api.ethash.remote.exitCh:
return false
}
// Block until hash rate submitted successfully.
<-done
return true
}
core-geth validation — **Identical** ✅ | | | |---|---| | File | [`api.go`](https://github.com/etclabscore/core-geth/blob/v1.12.20/consensus/ethash/api.go) | | Symbol | `API.SubmitHashrate` | | Ref | `v1.12.20` |

← Consensus & Ethash