Skip to content

Commit

Permalink
Add NodeToClientV_20
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo committed Jan 29, 2025
1 parent 21d3380 commit 29f7cf8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ouroboros-network-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

### Breaking changes

* Added `NodeToClientV_20`.

### Non-breaking changes

## 0.12.0.0 -- 2025-01-02
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ data NodeToClientVersion
-- ^ added @GetFuturePParams@ query
| NodeToClientV_19
-- ^ added @GetLedgerPeerSnapshot@
| NodeToClientV_20
-- ^ added @QueryStakePoolDefaultVote@
deriving (Eq, Ord, Enum, Bounded, Show, Typeable, Generic, NFData)

-- | We set 16ths bit to distinguish `NodeToNodeVersion` and
Expand All @@ -68,6 +70,7 @@ nodeToClientVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }
NodeToClientV_17 -> enc 17
NodeToClientV_18 -> enc 18
NodeToClientV_19 -> enc 19
NodeToClientV_20 -> enc 20
where
enc :: Int -> CBOR.Term
enc = CBOR.TInt . (`setBit` nodeToClientVersionBit)
Expand All @@ -78,6 +81,7 @@ nodeToClientVersionCodec = CodecCBORTerm { encodeTerm, decodeTerm }
17 -> Right NodeToClientV_17
18 -> Right NodeToClientV_18
19 -> Right NodeToClientV_19
20 -> Right NodeToClientV_20
n -> Left (unknownTag n)
where
dec :: CBOR.Term -> Either (Text, Maybe Int) Int
Expand Down

0 comments on commit 29f7cf8

Please sign in to comment.