Skip to content

Commit c2e936f

Browse files
committed
Some more name adjustments
1 parent 9f94642 commit c2e936f

File tree

2 files changed

+7
-7
lines changed
  • ouroboros-network-protocols/src/Ouroboros/Network/Protocol/ObjectDiffusion

2 files changed

+7
-7
lines changed

ouroboros-network-protocols/src/Ouroboros/Network/Protocol/ObjectDiffusion/Codec.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ encodeObjectDiffusion encodeObjectId encodeObject = encode
122122
encode MsgInit =
123123
CBOR.encodeListLen 1
124124
<> CBOR.encodeWord 6
125-
encode (MsgRequestObjectIds blocking (NumObjectIdsToAck ackNo) (NumObjectIdsToReq reqNo)) =
125+
encode (MsgRequestObjectIds blocking (NumObjectIdsAck ackNo) (NumObjectIdsReq reqNo)) =
126126
CBOR.encodeListLen 4
127127
<> CBOR.encodeWord 0
128128
<> CBOR.encodeBool
@@ -189,8 +189,8 @@ decodeObjectDiffusion decodeObjectId decodeObject = decode
189189
return (SomeMessage MsgInit)
190190
(SingIdle, 4, 0) -> do
191191
blocking <- CBOR.decodeBool
192-
ackNo <- NumObjectIdsToAck <$> CBOR.decodeWord16
193-
reqNo <- NumObjectIdsToReq <$> CBOR.decodeWord16
192+
ackNo <- NumObjectIdsAck <$> CBOR.decodeWord16
193+
reqNo <- NumObjectIdsReq <$> CBOR.decodeWord16
194194
return $! case blocking of
195195
True -> SomeMessage (MsgRequestObjectIds SingBlocking ackNo reqNo)
196196
False -> SomeMessage (MsgRequestObjectIds SingNonBlocking ackNo reqNo)

ouroboros-network-protocols/src/Ouroboros/Network/Protocol/ObjectDiffusion/Type.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,28 +158,28 @@ data StBlockingStyle where
158158
-- | In this state the peer must reply. There is a timeout.
159159
StNonBlocking :: StBlockingStyle
160160

161-
newtype NumObjectIdsAck = NumObjectIdsToAck {getNumObjectIdsToAck :: Word16}
161+
newtype NumObjectIdsAck = NumObjectIdsAck {getNumObjectIdsAck :: Word16}
162162
deriving (Eq, Ord, NFData, Generic)
163163
deriving newtype (Num, Enum, Real, Integral, Bounded, NoThunks)
164164
deriving (Semigroup) via (Sum Word16)
165165
deriving (Monoid) via (Sum Word16)
166166
deriving (Show) via (Quiet NumObjectIdsAck )
167167

168-
newtype NumObjectIdsReq = NumObjectIdsToReq {getNumObjectIdsToReq :: Word16}
168+
newtype NumObjectIdsReq = NumObjectIdsReq {getNumObjectIdsReq :: Word16}
169169
deriving (Eq, Ord, NFData, Generic)
170170
deriving newtype (Num, Enum, Real, Integral, Bounded, NoThunks)
171171
deriving (Semigroup) via (Sum Word16)
172172
deriving (Monoid) via (Sum Word16)
173173
deriving (Show) via (Quiet NumObjectIdsReq )
174174

175-
newtype NumObjectsReq = NumObjectsToReq {getNumObjectsToReq :: Word16}
175+
newtype NumObjectsReq = NumObjectsReq {getNumObjectsReq :: Word16}
176176
deriving (Eq, Ord, NFData, Generic)
177177
deriving newtype (Num, Enum, Real, Integral, Bounded, NoThunks)
178178
deriving (Semigroup) via (Sum Word16)
179179
deriving (Monoid) via (Sum Word16)
180180
deriving (Show) via (Quiet NumObjectsReq )
181181

182-
newtype NumObjectsOutstanding = NumObjectsInFifo {getNumObjectsInFifo :: Word16}
182+
newtype NumObjectsOutstanding = NumObjectsOutstanding {getNumObjectsOutstanding :: Word16}
183183
deriving (Eq, Ord, NFData, Generic)
184184
deriving newtype (Num, Enum, Real, Integral, Bounded, NoThunks)
185185
deriving (Semigroup) via (Sum Word16)

0 commit comments

Comments
 (0)