Skip to content

Commit f30072d

Browse files
committed
Added the map from (Credential 'Staking c) to (KeyHash 'Voting c) to the UMap. touches many files
1 parent 6079218 commit f30072d

File tree

17 files changed

+523
-168
lines changed

17 files changed

+523
-168
lines changed

eras/shelley/impl/src/Cardano/Ledger/Shelley/LedgerState/NewEpochState.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ reapRewards ::
116116
UMap c
117117
reapRewards (UMap tmap ptrmap) withdrawals = UMap (Map.mapWithKey g tmap) ptrmap
118118
where
119-
g k (Triple x y z) = Triple (fmap (removeRewards k) x) y z
119+
g k (Triple x y z w) = Triple (fmap (removeRewards k) x) y z w
120120
removeRewards k v@(RDPair _ d) =
121121
if k `Map.member` withdrawals then RDPair (CompactCoin 0) d else v
122122

eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Delegs.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ delegsTransition = do
265265
| (RewardAcnt _ cred, coin) <- Map.toList withdrawals_
266266
]
267267
f :: Coin -> Trip (EraCrypto era) -> Bool
268-
f coin1 (Triple (SJust (UM.RDPair coin2 _)) _ _) = coin1 == (fromCompact coin2)
268+
f coin1 (Triple (SJust (UM.RDPair coin2 _)) _ _ _) = coin1 == (fromCompact coin2)
269269
f _ _ = False
270270

271271
instance

eras/shelley/test-suite/bench/BenchUTxOAggregate.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ makeStatePair ::
9191
(DState c, PState c)
9292
makeStatePair rewards' delegs ptrs' poolParams =
9393
( DState
94-
(UM.unify (Map.map rdPair rewards') delegs ptrs')
94+
(UM.unify (Map.map rdPair rewards') delegs ptrs' Map.empty)
9595
Map.empty
9696
(GenDelegs Map.empty)
9797
(InstantaneousRewards Map.empty Map.empty mempty mempty)

eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Trace/Chain.hs

+1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ registerGenesisStaking
241241
(Map.map pairWithDepositsButNoRewards . Map.mapKeys KeyHashObj . LM.toMap $ sgsStake)
242242
(Map.mapKeys KeyHashObj $ LM.toMap sgsStake)
243243
(UM.ptrView (dsUnified (dpsDState oldDPState)))
244+
Map.empty
244245
}
245246

246247
-- We consider pools as having been registered in slot 0

0 commit comments

Comments
 (0)