Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
drsk committed Dec 3, 2024
1 parent 8b7c2ad commit 3984867
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,8 @@ testMissedRoundsUpdate accountConfigs = runTestBlockState @P8 $ do
bprd <- bsoGetBakerPoolRewardDetails bs0
let missedRounds0 = Map.fromList $ zip (Map.keys bprd) [1 ..]
bs1 <- bsoUpdateMissedRounds bs0 missedRounds0
missedRounds1 <- fmap (uncond . missedRounds) <$> bsoGetBakerPoolRewardDetails bs1
missedRounds1 <-
fmap (missedRounds . uncond . suspensionInfo) <$> bsoGetBakerPoolRewardDetails bs1
liftIO $
assertEqual
"Current epoch missed rounds should be updated as expeceted."
Expand All @@ -738,7 +739,8 @@ testMissedRoundsUpdate accountConfigs = runTestBlockState @P8 $ do
bs2 <- bsoSetNextEpochBakers bs1 newBakerStake (chainParams ^. cpFinalizationCommitteeParameters)
bs3 <- bsoSetNextCapitalDistribution bs2 CapitalDistribution{bakerPoolCapital = newPoolCapital, ..}
bs4 <- bsoRotateCurrentCapitalDistribution =<< bsoRotateCurrentEpochBakers bs3
missedRounds2 <- fmap (uncond . missedRounds) <$> bsoGetBakerPoolRewardDetails bs4
missedRounds2 <-
fmap (missedRounds . uncond . suspensionInfo) <$> bsoGetBakerPoolRewardDetails bs4
liftIO $
assertEqual
"Missed rounds should be carried over when rotating current capital distribution with new validators"
Expand All @@ -750,7 +752,8 @@ testMissedRoundsUpdate accountConfigs = runTestBlockState @P8 $ do
(all (== 0) $ Map.elems $ missedRounds2 `Map.difference` missedRounds1)
bs5 <- bsoSetNextEpochBakers bs4 bakerStakes (chainParams ^. cpFinalizationCommitteeParameters)
bs6 <- bsoSetNextCapitalDistribution bs5 CapitalDistribution{..}
missedRounds3 <- fmap (uncond . missedRounds) <$> bsoGetBakerPoolRewardDetails bs6
missedRounds3 <-
fmap (missedRounds . uncond . suspensionInfo) <$> bsoGetBakerPoolRewardDetails bs6
liftIO $
assertEqual
"Missed rounds should be carried over when rotating current capital distribution with new validators"
Expand Down

0 comments on commit 3984867

Please sign in to comment.