fix(pool): roll back failed submit tracking

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-05 01:23:50 +00:00
parent d43c8ee4c1
commit 264479d57b

View file

@ -138,7 +138,11 @@ func (c *StratumClient) Submit(jobID, nonce, result, algo string) int64 {
"algo": algo,
},
}
_ = c.writeJSON(req)
if err := c.writeJSON(req); err != nil {
c.mu.Lock()
delete(c.pending, seq)
c.mu.Unlock()
}
return seq
}