+got-peer-state helper
::
=+ ^- [her=ship =bone] (parse-bone-wire wire)
::
- =/ =peer-state
- =- ?>(?=(%known -<) ->)
- (~(got by peers.ames-state) her)
- ::
+ =/ =peer-state (got-peer-state her)
=/ =channel [[our her] now +>.ames-state -.peer-state]
=/ peer-core (make-peer-core peer-state channel)
=/ ok=? ?=(~ error)
::
=+ ^- [her=ship =bone] (parse-bone-wire wire)
::
- =/ =peer-state
- =- ?>(?=(%known -<) ->)
- (~(got by peers.ames-state) her)
- ::
+ =/ =peer-state (got-peer-state her)
=/ =channel [[our her] now +>.ames-state -.peer-state]
::
abet:(on-memo:(make-peer-core peer-state channel) bone message)
::
=+ ^- [her=ship =bone] (parse-pump-timer-wire wire)
::
- =/ =peer-state
- =- ?>(?=(%known -<) ->)
- (~(got by peers.ames-state) her)
- ::
+ =/ =peer-state (got-peer-state her)
=/ =channel [[our her] now +>.ames-state -.peer-state]
::
abet:(on-wake:(make-peer-core peer-state channel) bone error)
?: =(ship her-sponsor.channel)
event-core
$(ship her-sponsor.channel)
+ :: +got-peer-state: lookup .her state or crash
+ ::
+ ++ got-peer-state
+ |= her=ship
+ ^- peer-state
+ ::
+ ~| %freaky-alien^her
+ =- ?>(?=(%known -<) ->)
+ (~(got by peers.ames-state) her)
:: +make-peer-core: create nested |peer-core for per-peer processing
::
++ make-peer-core
