diff --git a/src/PaymentServer/Persistence.hs b/src/PaymentServer/Persistence.hs index 4fa499a860b7179a682a2efab78168cac2a40e5a..4163cadb0f1b19ac7b284a7af71e6d4c4c437de1 100644 --- a/src/PaymentServer/Persistence.hs +++ b/src/PaymentServer/Persistence.hs @@ -64,11 +64,15 @@ class VoucherDatabase d where -> IO (Either RedeemError ()) -- ^ Left indicating the redemption is not allowed or Right indicating it is. -- | MemoryVoucherDatabase is a voucher database that only persists state --- in-memory. The state does not outlive the process which creates it. This --- is primarily useful for testing. +-- in-memory. The state does not outlive the process which creates it (nor +-- even the MemoryVoucherDatabase value). This is primarily useful for +-- testing. data MemoryVoucherDatabase = - Memory - { paid :: IORef (Set.Set Voucher) + Memory { + -- | A set of vouchers which have been paid for. + paid :: IORef (Set.Set Voucher) + -- | A mapping from redeemed vouchers to fingerprints associated with the + -- redemption. , redeemed :: IORef (Map.Map Voucher Fingerprint) }