diff --git a/pkg/arvo/sys/vane/ames.hoon b/pkg/arvo/sys/vane/ames.hoon index 4d80fa748..a8f91372d 100644 --- a/pkg/arvo/sys/vane/ames.hoon +++ b/pkg/arvo/sys/vane/ames.hoon @@ -701,14 +701,15 @@ =(%$ syd) == ~ - :: /ax/protocol/version @ - :: /ax/peers (map ship ?(%alien known)) - :: /ax/peers/[ship] ship-state - :: /ax/bones/[ship] [snd=(set bone) rcv=(set bone)] - :: /ax/snd-bones/[ship]/[bone] vase + :: /ax/protocol/version @ + :: /ax/peers (map ship ?(%alien known)) + :: /ax/peers/[ship] ship-state + :: /ax/peers/[ship]/forward-lane (unit lane) + :: /ax/bones/[ship] [snd=(set bone) rcv=(set bone)] + :: /ax/snd-bones/[ship]/[bone] vase :: ?. ?=(%x ren) ~ - ?+ tyl [~ ~] + ?+ tyl ~ [%protocol %version ~] ``noun+!>(protocol-version) :: @@ -717,12 +718,35 @@ !> ^- (map ship ?(%alien %known)) (~(run by peers.ames-state) head) :: - [%peers @ ~] + [%peers @ *] =/ who (slaw %p i.t.tyl) ?~ who [~ ~] ?~ peer=(~(get by peers.ames-state) u.who) [~ ~] - ``noun+!>(u.peer) + ?+ t.t.tyl [~ ~] + ~ ``noun+!>(u.peer) + :: + [%forward-lane ~] + ::TODO (list lane) instead? + ::TODO refactor wrt +send-blob to share routing logic + :: find lane for u.who, or their galaxy + :: + :^ ~ ~ %noun + !> ^- (unit lane) + =/ ship-state (~(get by peers.ames-state) u.who) + ?. ?=([~ %known *] ship-state) + ~ + =/ peer-state +.u.ship-state + ?. =(~ route.peer-state) ::NOTE avoid tmi + `lane:(need route.peer-state) + |- ^- (unit lane) + ?: ?=(%czar (clan:title sponsor.peer-state)) + `[%& sponsor.peer-state] + =/ next (~(get by peers.ames-state) sponsor.peer-state) + ?. ?=([~ %known *] next) + ~ + $(peer-state +.u.next) + == :: [%bones @ ~] =/ who (slaw %p i.t.tyl)