[input-output-hk/cardano-sl] [CDEC-499] Create roundtrip + golden JSON tests for `TxpConfiguration` (with `RequiresNetworkMagic` field) (#3422)

mhuesch commented on this pull request.

> import Pos.Core (Address)
+import Pos.Util.Util (toAesonError)
+
+data RequiresNetworkMagic

@erikd didn’t respond to this earlier because I was figuring out a better approach —

Thanks for this feedback. The main motivation for `RequiresNetworkMagic` is that it’s easier to put a Bool-isomorphic type in a config file. Once we’ve read that, we can generate the `NetworkMagic` type you wrote above, and then pass that around. `RequiresNetworkMagic` should only live close to configuration parsing.

Your comments made me reassess the approach of using `TxpConfiguration` and we worked out a new approach today which I’m much happier with. See update [here](https://iohk.myjetbrains.com/youtrack/issue/CO-354#comment=93-27096).

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