Skip to content

Commit

Permalink
Inline putCheckpoint in rollback scenario test
Browse files Browse the repository at this point in the history
  • Loading branch information
HeinrichApfelmus committed Jun 5, 2023
1 parent 79889a5 commit d171eb2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs
Expand Up @@ -577,6 +577,15 @@ fileModeSpec = do
(view $ #currentTip . #blockHeight)
epochStability
(currentTip cpB ^. #blockHeight)
let putCheckpoint cp =
Delta.onDBVar walletState
$ Delta.update $ \_ ->
let (prologue, wcp) = WalletState.fromWallet cp
slot = WalletState.getSlot wcp
in [ WalletState.UpdateCheckpoints
[ Checkpoints.PutCheckpoint slot wcp ]
, WalletState.ReplacePrologue prologue
]

atomically $ do
putCheckpoint cpB
Expand Down

0 comments on commit d171eb2

Please sign in to comment.