mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 07:26:51 +03:00
naive: working spawn tests
This commit is contained in:
parent
5581094263
commit
e160485eb0
@ -318,7 +318,7 @@
|
|||||||
|= cur-event=event ^- ?
|
|= cur-event=event ^- ?
|
||||||
?+ tx-type.cur-event %.n
|
?+ tx-type.cur-event %.n
|
||||||
%transfer-point %.y
|
%transfer-point %.y
|
||||||
%set-transfer-proxy %.y :: TODO: double check this
|
%set-transfer-proxy %.n
|
||||||
==
|
==
|
||||||
-- :: +star-check
|
-- :: +star-check
|
||||||
++ planet-check
|
++ planet-check
|
||||||
@ -344,7 +344,7 @@
|
|||||||
%detach %.n
|
%detach %.n
|
||||||
%set-management-proxy %.y
|
%set-management-proxy %.y
|
||||||
%set-spawn-proxy %.n
|
%set-spawn-proxy %.n
|
||||||
%set-transfer-proxy %.n
|
%set-transfer-proxy %.y
|
||||||
==
|
==
|
||||||
++ managep-check
|
++ managep-check
|
||||||
|= cur-event=event ^- ?
|
|= cur-event=event ^- ?
|
||||||
@ -545,15 +545,16 @@
|
|||||||
(cury filter-owner %.y)
|
(cury filter-owner %.y)
|
||||||
(cury filter-proxy %own)
|
(cury filter-proxy %own)
|
||||||
(cury filter-nonce %.y)
|
(cury filter-nonce %.y)
|
||||||
:: (cury filter-dominion %l1)
|
::(cury filter-rank %star)
|
||||||
|
::(cury filter-dominion %l2)
|
||||||
%- cury
|
%- cury
|
||||||
:- filter-tx-type
|
:- filter-tx-type
|
||||||
:* :: %spawn :: currently crashes
|
:* %spawn :: currently crashes
|
||||||
::%transfer-point
|
::%transfer-point
|
||||||
::%configure-keys
|
::%configure-keys
|
||||||
%set-management-proxy
|
%set-management-proxy
|
||||||
%set-spawn-proxy
|
::%set-spawn-proxy
|
||||||
::%set-transfer-proxy
|
%set-transfer-proxy
|
||||||
~
|
~
|
||||||
==
|
==
|
||||||
==
|
==
|
||||||
@ -780,20 +781,19 @@
|
|||||||
::
|
::
|
||||||
=/ state initial-state
|
=/ state initial-state
|
||||||
=/ expect-state initial-state
|
=/ expect-state initial-state
|
||||||
|
|^
|
||||||
%+ expect-eq
|
%+ expect-eq
|
||||||
!>
|
!>
|
||||||
|^
|
|^
|
||||||
?. (~(got by suc-map) cur-event)
|
?. (~(got by suc-map) cur-event)
|
||||||
=/ new-nonce cur-point(nonce.owner.own +(cur-nonce))
|
(alter-state cur-point(nonce.owner.own +(cur-nonce)))
|
||||||
%= expect-state
|
|
||||||
points (~(put by points.expect-state) cur-ship new-nonce)
|
|
||||||
==
|
|
||||||
?+ tx-type.cur-event !!
|
?+ tx-type.cur-event !!
|
||||||
%transfer-point set-xfer
|
%transfer-point set-xfer
|
||||||
%configure-keys set-keys
|
%configure-keys set-keys
|
||||||
%set-management-proxy set-mgmt-proxy
|
%set-management-proxy set-mgmt-proxy
|
||||||
%set-spawn-proxy set-spwn-proxy
|
%set-spawn-proxy set-spwn-proxy
|
||||||
%set-transfer-proxy set-xfer-proxy
|
%set-transfer-proxy set-xfer-proxy
|
||||||
|
%spawn (new-point which-spawn)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ set-keys ^- ^state:naive
|
++ set-keys ^- ^state:naive
|
||||||
@ -838,8 +838,31 @@
|
|||||||
==
|
==
|
||||||
(alter-state new-xfer)
|
(alter-state new-xfer)
|
||||||
::
|
::
|
||||||
|
++ new-point
|
||||||
|
:: TODO clean up this horrifying gate
|
||||||
|
|= =ship ^- ^state:naive
|
||||||
|
=| new-point=point:naive
|
||||||
|
=/ spawned
|
||||||
|
%= new-point
|
||||||
|
dominion %l2
|
||||||
|
address.owner.own (addr (~(got by default-own-keys) cur-ship))
|
||||||
|
address.transfer-proxy.own (addr %spawn-test)
|
||||||
|
sponsor.net [has=%.y who=cur-ship]
|
||||||
|
==
|
||||||
|
=/ new-nonce
|
||||||
|
%= cur-point
|
||||||
|
nonce.owner.own +(cur-nonce)
|
||||||
|
==
|
||||||
|
=/ new-spawn=^state:naive
|
||||||
|
%= expect-state
|
||||||
|
points (~(put by points.expect-state) ship spawned)
|
||||||
|
==
|
||||||
|
%= new-spawn
|
||||||
|
points (~(put by points.new-spawn) cur-ship new-nonce)
|
||||||
|
==
|
||||||
|
::
|
||||||
++ alter-state
|
++ alter-state
|
||||||
|= new-point=point:naive
|
|= new-point=point:naive ^- ^state:naive
|
||||||
%= expect-state
|
%= expect-state
|
||||||
points (~(put by points.expect-state) cur-ship new-point)
|
points (~(put by points.expect-state) cur-ship new-point)
|
||||||
==
|
==
|
||||||
@ -887,23 +910,25 @@
|
|||||||
::
|
::
|
||||||
-- :: +def-args
|
-- :: +def-args
|
||||||
::
|
::
|
||||||
++ which-spawn ^- ship
|
|
||||||
?+ cur-ship !!
|
|
||||||
%~rut ~hasrut
|
|
||||||
%~rigrut ~batbec-tapmep
|
|
||||||
%~larsyx-mapmeg ~nocryl-tobned
|
|
||||||
%~holrut ~namtuc-ritnux
|
|
||||||
%~rabsum-ravtyd ~docsec-wanlug
|
|
||||||
%~dovmul-mogryt ~docsec-wanlug
|
|
||||||
%~pidted-dacnum ~docsec-wanlug
|
|
||||||
%~losrut ~mishus-loplus
|
|
||||||
%~radres-tinnyl ~tapfur-fitsep
|
|
||||||
%~pinpun-pilsun ~tapfur-fitsep
|
|
||||||
%~habtyc-nibpyx ~tapfur-fitsep
|
|
||||||
%~disryt-nolpet ~tapfur-fitsep
|
|
||||||
==
|
|
||||||
::
|
|
||||||
-- :: end of actual state
|
-- :: end of actual state
|
||||||
|
::
|
||||||
|
++ which-spawn ^- ship
|
||||||
|
?+ cur-ship !!
|
||||||
|
%~rut ~hasrut
|
||||||
|
%~rigrut ~batbec-tapmep
|
||||||
|
%~larsyx-mapmeg ~nocryl-tobned
|
||||||
|
%~holrut ~namtuc-ritnux
|
||||||
|
%~rabsum-ravtyd ~docsec-wanlug
|
||||||
|
%~dovmul-mogryt ~docsec-wanlug
|
||||||
|
%~pidted-dacnum ~docsec-wanlug
|
||||||
|
%~losrut ~mishus-loplus
|
||||||
|
%~radres-tinnyl ~tapfur-fitsep
|
||||||
|
%~pinpun-pilsun ~tapfur-fitsep
|
||||||
|
%~habtyc-nibpyx ~tapfur-fitsep
|
||||||
|
%~disryt-nolpet ~tapfur-fitsep
|
||||||
|
==
|
||||||
|
::
|
||||||
|
-- :: end of +expect-eq
|
||||||
::
|
::
|
||||||
++ test-marbud-l2-change-keys-new ^- tang
|
++ test-marbud-l2-change-keys-new ^- tang
|
||||||
=/ new-keys [%configure-keys encr auth suit |]
|
=/ new-keys [%configure-keys encr auth suit |]
|
||||||
|
Loading…
Reference in New Issue
Block a user