ames: only dedupe long messages

This commit is contained in:
Philip Monk 2020-05-04 21:18:26 -07:00
parent 081c8a864d
commit 490b615b6a
No known key found for this signature in database
GPG Key ID: B66E1F02604E44EC
2 changed files with 4 additions and 7 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7fe85d479aae1c292414312cf846004a4d23071d36436dbb77017a6d7816f156
size 12872198
oid sha256:84fb4865c84d2d1dc0ccab6948c30d495c7a80633fb66f067ca5ff36dfd95aa6
size 12870850

View File

@ -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
::