[input-output-hk/cardano-sl] [WIP] [CBR-305] SafeCopy instances for InDb types (#3381)

cleverca22 commented on this pull request.

>
-instance SafeCopy (InDb Core.Utxo) where
— getCopy = error «TODO: getCopy for (InDb Core.Utxo)»
— putCopy = error «TODO: putCopy for (InDb Core.Utxo)»
+instance SC.SafeCopy (InDb Core.RedeemPublicKey) where
+ getCopy = SC.contain $ do
+ bs :: B.ByteString <- SC.safeGet + pure (InDb (Core.RedeemPublicKey (Ed25519.PublicKey bs))) + putCopy (InDb (Core.RedeemPublicKey pk)) = SC.contain $ do + SC.safePut (Ed25519.unPublicKey pk :: B.ByteString) ``` src/Cardano/Wallet/Kernel/DB/InDb.hs:264:17: warning: [-Wdeprecations] In the use of ‘unPublicKey’ (imported from Crypto.Sign.Ed25519): Deprecated: "This accessor is deprecated, and will be removed in a future version. Use @'openPublicKey'@ instead." | 264 | SC.safePut (Ed25519.unPublicKey pk :: B.ByteString) | ^^^^^^^^^^^^^^^^^^^ : error:
Failing due to -Werror.
«`

Добавить комментарий