IntersectMBO / IntersectMBO/ouroboros-network

Better types for NodeToClientProtocols

Open
#1,799 0 comments 0 reactions 0 assignees View on GitHub
api
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.