Skip to content

Commit

Permalink
NodeToNodeV_7 version for full duplex connection
Browse files Browse the repository at this point in the history
  • Loading branch information
coot authored and karknu committed Jan 26, 2021
1 parent 13f0d57 commit becd227
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ouroboros-network/src/Ouroboros/Network/NodeToNode/Version.hs
Expand Up @@ -49,6 +49,10 @@ data NodeToNodeVersion
-- ^ Changes:
--
-- * Replace 'TxSubmision' with 'Txsubmission2' protocol.
| NodeToNodeV_7
-- ^ Changes:
--
-- * Enable full duplex connections.
deriving (Eq, Ord, Enum, Bounded, Show, Typeable)

nodeToNodeVersionCodec :: CodecCBORTerm (Text, Maybe Int) NodeToNodeVersion
Expand All @@ -60,13 +64,15 @@ nodeToNodeVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }
encodeTerm NodeToNodeV_4 = CBOR.TInt 4
encodeTerm NodeToNodeV_5 = CBOR.TInt 5
encodeTerm NodeToNodeV_6 = CBOR.TInt 6
encodeTerm NodeToNodeV_7 = CBOR.TInt 7

decodeTerm (CBOR.TInt 1) = Right NodeToNodeV_1
decodeTerm (CBOR.TInt 2) = Right NodeToNodeV_2
decodeTerm (CBOR.TInt 3) = Right NodeToNodeV_3
decodeTerm (CBOR.TInt 4) = Right NodeToNodeV_4
decodeTerm (CBOR.TInt 5) = Right NodeToNodeV_5
decodeTerm (CBOR.TInt 6) = Right NodeToNodeV_6
decodeTerm (CBOR.TInt 7) = Right NodeToNodeV_7
decodeTerm (CBOR.TInt n) = Left ( T.pack "decode NodeToNodeVersion: unknonw tag: "
<> T.pack (show n)
, Just n
Expand Down

0 comments on commit becd227

Please sign in to comment.