Closed HeinrichApfelmus closed 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-consensus
⟷ ChainPoint
may be a sensible idea, whereas I would skip it for the Read.ChainPoint
⟷ ChainPoint
as it involves a legacy type.
This pull request adds conversion function to/from the data type
ChainPoint
that belongs to theCardano.Wallet.Read
hierarchy.This includes
primitive
ouroboros-consensus
for the networking layerComments
primitive
types. However, we add conversionsRead.ChainPoint ⟷ ChainPoint
here in order to have more control over the source code impact of future pull requests. Specifically, we can then change the types inNetworkLayer
fromChainPoint
toRead.ChainPoint
while touching only a small portion of the code inCardano.Wallet
thanks to a cleverly inserted conversion.Issue Number
ADP-3350