Skip to content

Commit

Permalink
pool: fix set diff for unsupported miners.
Browse files Browse the repository at this point in the history
This fixes a bug related to sending a set difficulty
notification for an unsupported miner.
  • Loading branch information
dnldd committed Apr 12, 2021
1 parent fbe9f66 commit 3260b64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pool/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,12 @@ func (c *Client) handleExtraNonceSubscribeRequest(req *Request, allowed bool) er

// setDifficulty sends the pool client's difficulty ratio.
func (c *Client) setDifficulty() {
// Do not send a difficulty notification if the diff info
// for the miner is not set.
if c.diffInfo == nil {
return
}

c.mtx.RLock()
diffRat := c.diffInfo.difficulty
c.mtx.RUnlock()
Expand Down

0 comments on commit 3260b64

Please sign in to comment.