IntersectMBO / IntersectMBO/ouroboros-network
Better types for NodeToClientProtocols
- Dominant language
- Haskell
- Stars
- 296
- Forks
- 104
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 4
Description
The code in `cardano-node` was incorrectly updated to:
```
nodeToClientProtocols $ NodeToClientProtocols
{ localChainSyncProtocol = InitiatorProtocolOnly $
MuxPeer
nullTracer
localTxSubmissionCodec
(localTxSubmissionClientPeer localTxSubmissionClientNull)
, localTxSubmissionProtocol = InitiatorProtocolOnly $
MuxPeer
nullTracer
localChainSyncCodec
(chainSyncClientPeer chainSyncClient)
}
```
where the chain sync codec and peer was switched with the tx submission codec and peer. This code compiles without errors, in spite of being obviously incorrect.
Can this not be made type safe (preferably with Haskell98 types) so that something like this results in a compile error?
Contributor guide
Assessment
This issue has not been assessed yet.