Browse Source

Fix typo

pool
Sammy Libre 6 years ago
parent
commit
2ab620d673
  1. 2
      stratum/miner.go
  2. 2
      util/util_test.go

2
stratum/miner.go

@ -161,7 +161,7 @@ func (m *Miner) processShare(s *StratumServer, cs *Session, job *Job, t *BlockTe @@ -161,7 +161,7 @@ func (m *Miner) processShare(s *StratumServer, cs *Session, job *Job, t *BlockTe
return false
}
hashDiff, ok := util.GetHashDifficulty(hashBytes) // FIXME: Will return max int64 value if overflows
hashDiff, ok := util.GetHashDifficulty(hashBytes)
if !ok {
log.Printf("Bad hash from miner %v@%v", m.id, cs.ip)
atomic.AddInt64(&m.invalidShares, 1)

2
util/util_test.go

@ -29,7 +29,7 @@ func TestGetHashDifficulty(t *testing.T) { @@ -29,7 +29,7 @@ func TestGetHashDifficulty(t *testing.T) {
}
}
func TestGetHashDifficultyWothBrokenHash(t *testing.T) {
func TestGetHashDifficultyWithBrokenHash(t *testing.T) {
hash := ""
hashBytes, _ := hex.DecodeString(hash)
shareDiff, ok := GetHashDifficulty(hashBytes)

Loading…
Cancel
Save