alef: fix .origin.packet and a printf

This commit is contained in:
Ted Blackman 2019-08-20 14:44:44 -07:00
parent 40328be29c
commit 137be0ffde
2 changed files with 12 additions and 5 deletions

View File

@ -75,7 +75,12 @@
^+ this
=/ rcvr=ship (lane-to-ship lan)
=/ hear-lane (ship-to-lane sndr)
::~> %slog.0^leaf/"aqua: {(scow %p sndr)} -> {(scow %p rcvr)}"
=> ?. ?| =(rcvr ~linnup-torsyx-linnup-torsyx)
=(sndr ~linnup-torsyx-linnup-torsyx)
==
.
~> %slog.0^leaf/"aqua: {(scow %p sndr)} -> {(scow %p rcvr)}"
.
%- emit-aqua-events
[%event rcvr //newt/0v1n.2m9vh %hear hear-lane pac]~
:: +lane-to-ship: decode a ship from an aqua lane

View File

@ -987,9 +987,11 @@
++ on-hear-forward
|= [=lane =packet ok=?]
^+ event-core
:: set .origin.packet, re-encode, and send
:: set .origin.packet if it doesn't already have one, re-encode, and send
::
(send-blob rcvr.packet (encode-packet packet(origin `lane)))
=? origin.packet ?=(~ origin.packet) `lane
=/ =blob (encode-packet packet)
(send-blob rcvr.packet blob)
:: +on-hear-open: handle receipt of plaintext comet self-attestation
::
++ on-hear-open
@ -2376,8 +2378,8 @@
(give %send seq %& fragment-num)
:: whole message (n)ack
::
=/ ok=? (~(has in nax.state) seq)
~> %slog.0^leaf/"ames: send dupe message ack {<seq>}"
=/ ok=? !(~(has in nax.state) seq)
~> %slog.0^leaf/"ames: send dupe message ack {<seq>} ok={<ok>}"
(give %send seq %| ok lag=`@dr`0)
:: last-acked<seq<=last-heard; heard message, unprocessed
::