From 9b8700924501303087a8567477c06e75aeb961d8 Mon Sep 17 00:00:00 2001 From: drsk Date: Tue, 12 Nov 2024 14:34:20 +0100 Subject: [PATCH] fix migratePoolRewardsP1 This contained a recursive definition. --- .../src/Concordium/GlobalState/Persistent/PoolRewards.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/concordium-consensus/src/Concordium/GlobalState/Persistent/PoolRewards.hs b/concordium-consensus/src/Concordium/GlobalState/Persistent/PoolRewards.hs index 138783e15a..add62a8cf0 100644 --- a/concordium-consensus/src/Concordium/GlobalState/Persistent/PoolRewards.hs +++ b/concordium-consensus/src/Concordium/GlobalState/Persistent/PoolRewards.hs @@ -29,6 +29,7 @@ import Data.Word import Concordium.Crypto.SHA256 as Hash import Concordium.Types +import Concordium.Types.Conditionally import Concordium.Types.HashableTo import Concordium.Utils.BinarySearch import Concordium.Utils.Serialization.Put (MonadPut (..)) @@ -146,10 +147,11 @@ migratePoolRewardsP1 curBakers nextBakers blockCounts npEpoch npMintRate = do { blockCount = Map.findWithDefault 0 bid blockCounts, transactionFeesAccrued = 0, finalizationAwake = False, - missedRounds = 0 <$ missedRounds bprd + missedRounds = conditionally hasValidatorSuspension 0 } (!newRef, _) <- refFlush =<< refMake bprd return newRef + hasValidatorSuspension = sSupportsValidatorSuspension (accountVersion @av) -- | Look up the baker capital and reward details for a baker ID. lookupBakerCapitalAndRewardDetails ::