ames: delete naxplanation flows if bone is corked

This commit is contained in:
yosoyubik 2022-07-18 10:21:43 +02:00
parent 35c6ac416e
commit a5aedaccc5

View File

@ -2584,6 +2584,16 @@
++ on-pump-done
|= [=message-num error=(unit error)]
^+ peer-core
?: ?& =(1 (end 0 bone))
=(1 (end 0 (rsh 0 bone)))
(~(has in corked.peer-state) (mix 0b10 bone))
==
%- %+ trace msg.veb
=/ dat [her.channel bone=bone message-num=message-num -.task]
|.("remove naxplanation flow {<dat>}")
=. snd.peer-state
(~(del by snd.peer-state) bone)
peer-core
:: if odd bone, ack is on "subscription update" message; no-op
::
?: =(1 (end 0 bone))
@ -2702,11 +2712,6 @@
::
(emit [/ames]~ %pass wire %b %rest next-wake)
=/ nax-bone=^bone (mix 0b10 bone)
=. snd.peer-state
:: unconditionally delete possible naxplanations flows that
:: could have been sent if receivig a cork before upgrade
::
(~(del by snd.peer-state) nax-bone)
=. peer-state
=, peer-state
%_ peer-state