ethash: fix usage of extraNonce

parent ac3d3ebe
Pipeline #17924441 passed with stages
in 7 minutes and 22 seconds
......@@ -61,7 +61,7 @@ func (work *Work) Verify(hash *Ethash, nonce uint64) (bool, error) {
}
func (work *Work) VerifySend(hash *Ethash, nonce uint64, results chan<- Share) (bool, error) {
if ok, err := work.Verify(hash, nonce); ok {
if ok, err := work.Verify(hash, work.ExtraNonce+nonce); ok {
results <- Share{
JobId: work.JobId,
Nonce: nonce,
......@@ -73,8 +73,8 @@ func (work *Work) VerifySend(hash *Ethash, nonce uint64, results chan<- Share) (
}
func (work *Work) VerifyRange(hash *Ethash, start uint64, size uint64, results chan<- Share) error {
end := start + size + work.ExtraNonce
for i := start + work.ExtraNonce; i < end; i++ {
end := start + size
for i := start; i < end; i++ {
if _, err := work.VerifySend(hash, i, results); err != nil {
return err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment