mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 22:33:06 +03:00
ames: only dedupe long messages
This commit is contained in:
parent
081c8a864d
commit
490b615b6a
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7fe85d479aae1c292414312cf846004a4d23071d36436dbb77017a6d7816f156
|
||||
size 12872198
|
||||
oid sha256:84fb4865c84d2d1dc0ccab6948c30d495c7a80633fb66f067ca5ff36dfd95aa6
|
||||
size 12870850
|
||||
|
@ -2128,7 +2128,8 @@
|
||||
++ dedup-message
|
||||
|= =message-blob
|
||||
^+ message-blob
|
||||
~& > deduping=`@p`(mug message-blob)
|
||||
?: (lte (met 13 message-blob) 1)
|
||||
message-blob
|
||||
=/ peers-l=(list [=ship =ship-state]) ~(tap by peers.ames-state)
|
||||
|- ^+ message-blob
|
||||
=* peer-loop $
|
||||
@ -2148,16 +2149,12 @@
|
||||
=* blob-loop $
|
||||
?^ blob-l
|
||||
?: =(i.blob-l message-blob)
|
||||
~& > found=`@p`(mug i.blob-l)
|
||||
i.blob-l
|
||||
~& > lost=`@p`(mug i.blob-l)
|
||||
blob-loop(blob-l t.blob-l)
|
||||
?~ unsent-fragments.message-pump-state.i.snd-l
|
||||
bone-loop(snd-l t.snd-l)
|
||||
?: =(message-blob fragment.i.unsent-fragments.message-pump-state.i.snd-l)
|
||||
~& > found-unsent=`@p`(mug message-blob)
|
||||
`@`fragment.i.unsent-fragments.message-pump-state.i.snd-l
|
||||
~& > lost-unsent=`@p`(mug fragment.i.unsent-fragments.message-pump-state.i.snd-l)
|
||||
bone-loop(snd-l t.snd-l)
|
||||
:: +on-wake: handle timer expiration
|
||||
::
|
||||
|
Loading…
Reference in New Issue
Block a user