Skip to content

Commit ffc0364

Browse files
committed
Remove SizeInBytes from ObjectDiffusion
1 parent abf097c commit ffc0364

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,15 @@ encodeObjectDiffusion encodeObjectId encodeObject = encode
137137
<> CBOR.encodeWord 1
138138
<> CBOR.encodeListLenIndef
139139
<> foldr
140-
( \(objId, SizeInBytes sz) r ->
140+
( \objId r ->
141141
CBOR.encodeListLen 2
142142
<> encodeObjectId objId
143-
<> CBOR.encodeWord32 sz
144143
<> r
145144
)
146145
CBOR.encodeBreak
147146
objIds'
148147
where
149-
objIds' :: [(objectId, SizeInBytes)]
148+
objIds' :: [objectId]
150149
objIds' = case objIds of
151150
BlockingReply xs -> NonEmpty.toList xs
152151
NonBlockingReply xs -> xs
@@ -204,9 +203,7 @@ decodeObjectDiffusion decodeObjectId decodeObject = decode
204203
reverse
205204
( do
206205
CBOR.decodeListLenOf 2
207-
objId <- decodeObjectId
208-
sz <- CBOR.decodeWord32
209-
return (objId, SizeInBytes sz)
206+
decodeObjectId
210207
)
211208
case (b, objIds) of
212209
(SingBlocking, t : ts) ->

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ data ObjectDiffusionInboundPipelined objectId object m a where
4242
data Collect objectId object
4343
= -- | The result of 'SendMsgRequestObjectIdsPipelined'. It also carries
4444
-- the number of objectIds originally requested.
45-
CollectObjectIds NumObjectIdsToReq [(objectId, SizeInBytes)]
45+
CollectObjectIds NumObjectIdsToReq [objectId]
4646
| -- | The result of 'SendMsgRequestObjectsPipelined'. The actual reply only
4747
-- contains the objects sent, but this pairs them up with the
4848
-- objects requested. This is because the peer can determine that
@@ -57,7 +57,7 @@ data InboundStIdle (n :: N) objectId object m a where
5757
NumObjectIdsToReq ->
5858
-- | Result if done
5959
m a ->
60-
( NonEmpty (objectId, SizeInBytes) ->
60+
( NonEmpty objectId ->
6161
m (InboundStIdle Z objectId object m a)
6262
) ->
6363
InboundStIdle Z objectId object m a

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ data OutboundStIdle objectId object m a = OutboundStIdle
6464

6565
data OutboundStObjectIds blocking objectId object m a where
6666
SendMsgReplyObjectIds ::
67-
BlockingReplyList blocking (objectId, SizeInBytes) ->
67+
BlockingReplyList blocking objectId ->
6868
OutboundStIdle objectId object m a ->
6969
OutboundStObjectIds blocking objectId object m a
7070
-- | In the blocking case, the outbound can terminate the protocol. This could

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ instance Protocol (ObjectDiffusion initAgency objectId object) where
272272
-- order in which they are submitted to the mempool, to preserve dependent
273273
-- objects.
274274
MsgReplyObjectIds ::
275-
BlockingReplyList blocking (objectId, SizeInBytes) ->
275+
BlockingReplyList blocking objectId ->
276276
Message (ObjectDiffusion initAgency objectId object) (StObjectIds blocking) StIdle
277277
-- \| Request one or more objects corresponding to the given object
278278
-- identifiers.

ouroboros-network/src/Ouroboros/Network/NodeToNode.hs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ import Ouroboros.Network.Server.RateLimiting
102102
import Ouroboros.Network.Snocket
103103
import Ouroboros.Network.Socket
104104
import Ouroboros.Network.Util.ShowProxy (ShowProxy, showProxy)
105-
import Ouroboros.Network.Protocol.ObjectDiffusion.Type (NumObjectIdsToAck)
106105
import Ouroboros.Network.Protocol.ObjectDiffusion.Type (NumObjectsInFifo)
107106

108107

0 commit comments

Comments
 (0)