Skip to content

Commit a7011c3

Browse files
committed
Added NodeToClientV_21
1 parent f7b2f02 commit a7011c3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

ouroboros-network-api/src/Ouroboros/Network/NodeToClient/Version.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ data NodeToClientVersion
5353
-- ^ added @GetLedgerPeerSnapshot@
5454
| NodeToClientV_20
5555
-- ^ added @QueryStakePoolDefaultVote@
56+
| NodeToClientV_21
57+
-- ^ added @GetNetworkState@
5658
deriving (Eq, Ord, Enum, Bounded, Show, Typeable, Generic, NFData)
5759

5860
-- | We set 16ths bit to distinguish `NodeToNodeVersion` and
@@ -71,6 +73,7 @@ nodeToClientVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }
7173
NodeToClientV_18 -> enc 18
7274
NodeToClientV_19 -> enc 19
7375
NodeToClientV_20 -> enc 20
76+
NodeToClientV_21 -> enc 21
7477
where
7578
enc :: Int -> CBOR.Term
7679
enc = CBOR.TInt . (`setBit` nodeToClientVersionBit)
@@ -82,6 +85,7 @@ nodeToClientVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }
8285
18 -> Right NodeToClientV_18
8386
19 -> Right NodeToClientV_19
8487
20 -> Right NodeToClientV_20
88+
21 -> Right NodeToClientV_21
8589
n -> Left (unknownTag n)
8690
where
8791
dec :: CBOR.Term -> Either (Text, Maybe Int) Int

ouroboros-network-protocols/cddl/specs/handshake-node-to-client.cddl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ versionTable = { * versionNumber => nodeToClientVersionData }
1818

1919

2020
; as of version 2 (which is no longer supported) we set 15th bit to 1
21-
; 16 / 17 / 18 / 19 / 20
22-
versionNumber = 32784 / 32785 / 32786 / 32787 / 32788
21+
; 16 / 17 / 18 / 19 / 20 / 21
22+
versionNumber = 32784 / 32785 / 32786 / 32787 / 32788 / 32789
2323

2424
; As of version 15 and higher
2525
nodeToClientVersionData = [networkMagic, query]

0 commit comments

Comments
 (0)