mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-19 21:02:01 +03:00
ames: rename per-event -> ev
This commit is contained in:
parent
311fa0efbb
commit
07af14ecc3
@ -2080,13 +2080,13 @@
|
|||||||
|
|
||||||
--
|
--
|
||||||
::
|
::
|
||||||
=> :: |per-event: inner event-handling core
|
=> :: |ev: inner event-handling core
|
||||||
::
|
::
|
||||||
~% %per-event ..decode-packet ~
|
~% %per-event ..decode-packet ~
|
||||||
|%
|
|%
|
||||||
++ per-event
|
++ ev
|
||||||
=| moves=(list move)
|
=| moves=(list move)
|
||||||
~% %event-gate ..per-event ~
|
~% %event-gate ..ev ~
|
||||||
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
|= [[now=@da eny=@ rof=roof] =duct =ames-state]
|
||||||
=* veb veb.bug.ames-state
|
=* veb veb.bug.ames-state
|
||||||
=| cork-bone=(unit bone) :: modified by +on-kroc
|
=| cork-bone=(unit bone) :: modified by +on-kroc
|
||||||
@ -2096,10 +2096,10 @@
|
|||||||
++ abet [(flop moves) ames-state]
|
++ abet [(flop moves) ames-state]
|
||||||
++ emit |=(=move event-core(moves [move moves]))
|
++ emit |=(=move event-core(moves [move moves]))
|
||||||
++ channel-state [life crypto-core bug]:ames-state
|
++ channel-state [life crypto-core bug]:ames-state
|
||||||
++ trace
|
++ ev-trace
|
||||||
|= [verb=? =ship print=(trap tape)]
|
|= [verb=? =ship print=(trap tape)]
|
||||||
^+ same
|
^+ same
|
||||||
(^trace verb ship ships.bug.ames-state print)
|
(trace verb ship ships.bug.ames-state print)
|
||||||
:: +on-take-done: handle notice from vane that it processed a message
|
:: +on-take-done: handle notice from vane that it processed a message
|
||||||
::
|
::
|
||||||
++ on-take-done
|
++ on-take-done
|
||||||
@ -2123,13 +2123,13 @@
|
|||||||
==
|
==
|
||||||
:: ignore events from an old rift
|
:: ignore events from an old rift
|
||||||
::
|
::
|
||||||
%- %^ trace odd.veb her
|
%- %^ ev-trace odd.veb her
|
||||||
|.("dropping old rift wire: {(spud wire)}")
|
|.("dropping old rift wire: {(spud wire)}")
|
||||||
event-core
|
event-core
|
||||||
=/ =bone
|
=/ =bone
|
||||||
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
||||||
=? peer-core ?=([%old *] u.parsed)
|
=? peer-core ?=([%old *] u.parsed)
|
||||||
%- %^ trace odd.veb her
|
%- %^ ev-trace odd.veb her
|
||||||
|.("parsing old wire: {(spud wire)}")
|
|.("parsing old wire: {(spud wire)}")
|
||||||
peer-core
|
peer-core
|
||||||
?~ error
|
?~ error
|
||||||
@ -2317,12 +2317,12 @@
|
|||||||
~/ %on-hear-packet
|
~/ %on-hear-packet
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
^+ event-core
|
^+ event-core
|
||||||
%- (trace odd.veb sndr.packet |.("received packet"))
|
%- (ev-trace odd.veb sndr.packet |.("received packet"))
|
||||||
::
|
::
|
||||||
?: =(our sndr.packet)
|
?: =(our sndr.packet)
|
||||||
event-core
|
event-core
|
||||||
?: (~(has in snub.ames-state) sndr.packet)
|
?: (~(has in snub.ames-state) sndr.packet)
|
||||||
%- (trace rcv.veb sndr.packet |.("snubbed"))
|
%- (ev-trace rcv.veb sndr.packet |.("snubbed"))
|
||||||
event-core
|
event-core
|
||||||
::
|
::
|
||||||
%. +<
|
%. +<
|
||||||
@ -2347,7 +2347,7 @@
|
|||||||
~/ %on-hear-forward
|
~/ %on-hear-forward
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
^+ event-core
|
^+ event-core
|
||||||
%- %^ trace for.veb sndr.packet
|
%- %^ ev-trace for.veb sndr.packet
|
||||||
|.("forward: {<sndr.packet>} -> {<rcvr.packet>}")
|
|.("forward: {<sndr.packet>} -> {<rcvr.packet>}")
|
||||||
:: set .origin.packet if it doesn't already have one, re-encode, and send
|
:: set .origin.packet if it doesn't already have one, re-encode, and send
|
||||||
::
|
::
|
||||||
@ -2366,7 +2366,7 @@
|
|||||||
++ on-hear-keys
|
++ on-hear-keys
|
||||||
~/ %on-hear-keys
|
~/ %on-hear-keys
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
=+ %^ trace msg.veb sndr.packet
|
=+ %^ ev-trace msg.veb sndr.packet
|
||||||
|.("requested attestation")
|
|.("requested attestation")
|
||||||
?. =(%pawn (clan:title our))
|
?. =(%pawn (clan:title our))
|
||||||
event-core
|
event-core
|
||||||
@ -2377,7 +2377,7 @@
|
|||||||
~/ %on-hear-open
|
~/ %on-hear-open
|
||||||
|= [=lane =packet dud=(unit goof)]
|
|= [=lane =packet dud=(unit goof)]
|
||||||
^+ event-core
|
^+ event-core
|
||||||
=+ %^ trace msg.veb sndr.packet
|
=+ %^ ev-trace msg.veb sndr.packet
|
||||||
|.("got attestation")
|
|.("got attestation")
|
||||||
:: assert the comet can't pretend to be a moon or other address
|
:: assert the comet can't pretend to be a moon or other address
|
||||||
::
|
::
|
||||||
@ -2492,13 +2492,13 @@
|
|||||||
==
|
==
|
||||||
:: ignore events from an old rift
|
:: ignore events from an old rift
|
||||||
::
|
::
|
||||||
%- %^ trace odd.veb her
|
%- %^ ev-trace odd.veb her
|
||||||
|.("dropping old rift wire: {(spud wire)}")
|
|.("dropping old rift wire: {(spud wire)}")
|
||||||
event-core
|
event-core
|
||||||
=/ =bone
|
=/ =bone
|
||||||
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
?-(u.parsed [%new *] bone.u.parsed, [%old *] bone.u.parsed)
|
||||||
=? peer-core ?=([%old *] u.parsed)
|
=? peer-core ?=([%old *] u.parsed)
|
||||||
%- %^ trace odd.veb her
|
%- %^ ev-trace odd.veb her
|
||||||
|.("parsing old wire: {(spud wire)}")
|
|.("parsing old wire: {(spud wire)}")
|
||||||
peer-core
|
peer-core
|
||||||
abet:(on-memo:peer-core bone payload %boon)
|
abet:(on-memo:peer-core bone payload %boon)
|
||||||
@ -2528,7 +2528,7 @@
|
|||||||
=/ =channel [[our ship] now channel-state -.peer-state]
|
=/ =channel [[our ship] now channel-state -.peer-state]
|
||||||
::
|
::
|
||||||
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
=^ =bone ossuary.peer-state (bind-duct ossuary.peer-state duct)
|
||||||
%- %^ trace msg.veb ship
|
%- %^ ev-trace msg.veb ship
|
||||||
|. ^- tape
|
|. ^- tape
|
||||||
=/ sndr [our our-life.channel]
|
=/ sndr [our our-life.channel]
|
||||||
=/ rcvr [ship her-life.channel]
|
=/ rcvr [ship her-life.channel]
|
||||||
@ -2555,11 +2555,11 @@
|
|||||||
::
|
::
|
||||||
?. (~(has by by-bone.ossuary.peer-state) bone)
|
?. (~(has by by-bone.ossuary.peer-state) bone)
|
||||||
%. event-core
|
%. event-core
|
||||||
%^ trace odd.veb ship
|
%^ ev-trace odd.veb ship
|
||||||
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
|
|.("trying to cork {<bone=bone>}, not in the ossuary, ignoring")
|
||||||
::
|
::
|
||||||
=. closing.peer-state (~(put in closing.peer-state) bone)
|
=. closing.peer-state (~(put in closing.peer-state) bone)
|
||||||
%- %^ trace msg.veb ship
|
%- %^ ev-trace msg.veb ship
|
||||||
|. ^- tape
|
|. ^- tape
|
||||||
=/ sndr [our our-life.channel]
|
=/ sndr [our our-life.channel]
|
||||||
=/ rcvr [ship her-life.channel]
|
=/ rcvr [ship her-life.channel]
|
||||||
@ -2590,7 +2590,7 @@
|
|||||||
==
|
==
|
||||||
?: (~(has in closing.peer-state) forward-bone)
|
?: (~(has in closing.peer-state) forward-bone)
|
||||||
%. subs
|
%. subs
|
||||||
%^ trace &(dry odd.veb) ship
|
%^ ev-trace &(dry odd.veb) ship
|
||||||
|.
|
|.
|
||||||
%+ weld "stale flow bone={<forward-bone>} in closing, "
|
%+ weld "stale flow bone={<forward-bone>} in closing, "
|
||||||
"#{<~(wyt in live:packet-pump-state)>} packets retrying"
|
"#{<~(wyt in live:packet-pump-state)>} packets retrying"
|
||||||
@ -2625,7 +2625,7 @@
|
|||||||
::
|
::
|
||||||
?. =(resubs 1)
|
?. =(resubs 1)
|
||||||
%. &
|
%. &
|
||||||
(trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
|
(ev-trace &(dry odd.veb) ship |.((weld "stale %watch plea " log)))
|
||||||
:: the current subscription can be safely corked if there
|
:: the current subscription can be safely corked if there
|
||||||
:: is a flow with a naxplanation ack on a backward bone
|
:: is a flow with a naxplanation ack on a backward bone
|
||||||
::
|
::
|
||||||
@ -2635,7 +2635,7 @@
|
|||||||
?~ (~(get by rcv.peer-state) backward-bone)
|
?~ (~(get by rcv.peer-state) backward-bone)
|
||||||
|
|
|
|
||||||
%. &
|
%. &
|
||||||
(trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
|
(ev-trace &(dry odd.veb) ship |.((weld "failed %watch plea " log)))
|
||||||
:: +on-take-wake: receive wakeup or error notification from behn
|
:: +on-take-wake: receive wakeup or error notification from behn
|
||||||
::
|
::
|
||||||
++ on-take-wake
|
++ on-take-wake
|
||||||
@ -3041,7 +3041,7 @@
|
|||||||
++ request-attestation
|
++ request-attestation
|
||||||
|= =ship
|
|= =ship
|
||||||
^+ event-core
|
^+ event-core
|
||||||
=+ (trace msg.veb ship |.("requesting attestion"))
|
=+ (ev-trace msg.veb ship |.("requesting attestion"))
|
||||||
=. event-core (send-blob | ship (sendkeys-packet ship))
|
=. event-core (send-blob | ship (sendkeys-packet ship))
|
||||||
=/ =wire /alien/(scot %p ship)
|
=/ =wire /alien/(scot %p ship)
|
||||||
(emit duct %pass wire %b %wait (add now ~s30))
|
(emit duct %pass wire %b %wait (add now ~s30))
|
||||||
@ -3058,7 +3058,7 @@
|
|||||||
|= [for=? =ship =blob]
|
|= [for=? =ship =blob]
|
||||||
::
|
::
|
||||||
=/ final-ship ship
|
=/ final-ship ship
|
||||||
%- (trace rot.veb final-ship |.("send-blob: to {<ship>}"))
|
%- (ev-trace rot.veb final-ship |.("send-blob: to {<ship>}"))
|
||||||
|-
|
|-
|
||||||
|^ ^+ event-core
|
|^ ^+ event-core
|
||||||
::
|
::
|
||||||
@ -3099,10 +3099,10 @@
|
|||||||
(try-next-sponsor sponsor.peer-state)
|
(try-next-sponsor sponsor.peer-state)
|
||||||
::
|
::
|
||||||
?~ route=route.peer-state
|
?~ route=route.peer-state
|
||||||
%- (trace rot.veb final-ship |.("no route to: {<ship>}"))
|
%- (ev-trace rot.veb final-ship |.("no route to: {<ship>}"))
|
||||||
(try-next-sponsor sponsor.peer-state)
|
(try-next-sponsor sponsor.peer-state)
|
||||||
::
|
::
|
||||||
%- (trace rot.veb final-ship |.("trying route: {<ship>}"))
|
%- (ev-trace rot.veb final-ship |.("trying route: {<ship>}"))
|
||||||
=. event-core
|
=. event-core
|
||||||
(emit unix-duct.ames-state %give %send lane.u.route blob)
|
(emit unix-duct.ames-state %give %send lane.u.route blob)
|
||||||
::
|
::
|
||||||
@ -3188,7 +3188,7 @@
|
|||||||
++ trace
|
++ trace
|
||||||
|= [verb=? print=(trap tape)]
|
|= [verb=? print=(trap tape)]
|
||||||
^+ same
|
^+ same
|
||||||
(^trace verb her.channel print)
|
(ev-trace verb her.channel print)
|
||||||
++ on-heed peer-core(heeds.peer-state (~(put in heeds.peer-state) duct))
|
++ on-heed peer-core(heeds.peer-state (~(put in heeds.peer-state) duct))
|
||||||
++ on-jilt peer-core(heeds.peer-state (~(del in heeds.peer-state) duct))
|
++ on-jilt peer-core(heeds.peer-state (~(del in heeds.peer-state) duct))
|
||||||
:: +update-qos: update and maybe print connection status
|
:: +update-qos: update and maybe print connection status
|
||||||
@ -3820,8 +3820,8 @@
|
|||||||
|= [=duct dud=(unit goof) wrapped-task=(hobo task)]
|
|= [=duct dud=(unit goof) wrapped-task=(hobo task)]
|
||||||
^- [(list move) _ames-gate]
|
^- [(list move) _ames-gate]
|
||||||
::
|
::
|
||||||
=/ =task ((harden task) wrapped-task)
|
=/ =task ((harden task) wrapped-task)
|
||||||
=/ event-core (per-event [now eny rof] duct ames-state)
|
=/ event-core (ev [now eny rof] duct ames-state)
|
||||||
::
|
::
|
||||||
=^ moves ames-state
|
=^ moves ames-state
|
||||||
=< abet
|
=< abet
|
||||||
@ -3862,7 +3862,7 @@
|
|||||||
~|(%ames-take-dud (mean tang.u.dud))
|
~|(%ames-take-dud (mean tang.u.dud))
|
||||||
::
|
::
|
||||||
::
|
::
|
||||||
=/ event-core (per-event [now eny rof] duct ames-state)
|
=/ event-core (ev [now eny rof] duct ames-state)
|
||||||
::
|
::
|
||||||
=^ moves ames-state
|
=^ moves ames-state
|
||||||
=< abet
|
=< abet
|
||||||
|
Loading…
Reference in New Issue
Block a user