cardano-foundation / cardano-wallet

HTTP server & command-line for managing UTxOs and HD wallets in Cardano.
Apache License 2.0
764 stars 212 forks source link

[ADP-3350] Conversion to/from `Read.ChainPoint` #4540

Closed HeinrichApfelmus closed 5 months ago

HeinrichApfelmus commented 5 months ago

This pull request adds conversion function to/from the data type ChainPoint that belongs to the Cardano.Wallet.Read hierarchy.

This includes

Comments

Issue Number

ADP-3350

HeinrichApfelmus commented 5 months ago

Thanks for the review! 🙏

Some food for thought ... Should we at some point in future think about adding roundtrips checking

Ah. Fair enough. I consider this particular code to be "obviously correct", and the type checker imposes strong constraints on what it can do, but there is always undefined or typos. Testing the roundtrip ouroboros-consensusChainPoint may be a sensible idea, whereas I would skip it for the Read.ChainPointChainPoint as it involves a legacy type.