|
4 | 4 | {-# LANGUAGE ScopedTypeVariables #-} |
5 | 5 | {-# LANGUAGE TypeApplications #-} |
6 | 6 |
|
| 7 | +{-# OPTIONS_GHC -Wno-unused-top-binds #-} |
| 8 | + |
7 | 9 | -- | |
8 | 10 | -- Module: Worker.POW.Stratum.Server |
9 | 11 | -- Copyright: Copyright © 2021 Kadena LLC. |
@@ -277,7 +279,7 @@ targetPeriod :: Period |
277 | 279 | targetPeriod = Period 10 |
278 | 280 |
|
279 | 281 | notify :: Logger -> AppData -> SessionState -> Job -> IO () |
280 | | -notify logger app sessionCtx job = do |
| 282 | +notify logger app _sessionCtx job = do |
281 | 283 | writeLog logger L.Info "sending notification" |
282 | 284 | send app $ Notify (_jobId job, _jobWork job, True) -- for now we always replace previous work |
283 | 285 |
|
@@ -330,7 +332,7 @@ stratumDifficultyFromText t = case readEither @Int $ T.unpack t of |
330 | 332 | instance A.ToJSON StratumDifficulty where |
331 | 333 | toJSON WorkDifficulty = "block" |
332 | 334 | toJSON (DifficultyLevel i) = A.toJSON i |
333 | | - toJSON (DifficultyPeriod i) = error "ToJSON StratumDifficulty: difficulty period is currently not supported" |
| 335 | + toJSON (DifficultyPeriod _i) = error "ToJSON StratumDifficulty: difficulty period is currently not supported" |
334 | 336 |
|
335 | 337 | instance A.FromJSON StratumDifficulty where |
336 | 338 | parseJSON v = case v of |
@@ -384,7 +386,7 @@ getNewSessionTarget stratumDifficulty currentHashRate currentTarget jobTarget |
384 | 386 | DifficultyPeriod p -> newPeriodTarget p |
385 | 387 |
|
386 | 388 | -- The final target must be inbetween maxSessionTarget and jobTarget |
387 | | - newPeriodTarget p = max jobTarget (min maxSessionTarget candidate) |
| 389 | + newPeriodTarget _p = max jobTarget (min maxSessionTarget candidate) |
388 | 390 | where |
389 | 391 | curD = targetToDifficulty currentTarget |
390 | 392 | newD = adjustDifficulty periodTolerance currentHashRate targetPeriod curD |
|
0 commit comments