mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 13:54:20 +03:00
naive: adoption test was wrong, not naive.hoon
This commit is contained in:
parent
e9b77881d1
commit
3658bb53e7
@ -151,7 +151,6 @@
|
|||||||
=^ f5 state (n state %bat q:(gen-tx 0 lm-escape %rigrut-lm-key-0))
|
=^ f5 state (n state %bat q:(gen-tx 0 lm-escape %rigrut-lm-key-0))
|
||||||
[:(welp f1 f2 f3 f4 f5) state]
|
[:(welp f1 f2 f3 f4 f5) state]
|
||||||
::
|
::
|
||||||
::
|
|
||||||
:: ~dopbud is for testing L1 ownership with L2 spawn proxy
|
:: ~dopbud is for testing L1 ownership with L2 spawn proxy
|
||||||
::
|
::
|
||||||
++ init-dopbud
|
++ init-dopbud
|
||||||
@ -611,11 +610,11 @@
|
|||||||
++ gen-rut-jar
|
++ gen-rut-jar
|
||||||
^- (jar @p event)
|
^- (jar @p event)
|
||||||
=/ filter ;: cork
|
=/ filter ;: cork
|
||||||
(cury filter-owner %.y)
|
(cury filter-owner %.n)
|
||||||
(cury filter-proxy %own)
|
(cury filter-proxy %own)
|
||||||
(cury filter-nonce %.y)
|
(cury filter-nonce %.y)
|
||||||
::(cury filter-rank %star)
|
(cury filter-rank %planet)
|
||||||
::(cury filter-dominion %l1)
|
(cury filter-dominion %l1)
|
||||||
%- cury
|
%- cury
|
||||||
:- filter-tx-type
|
:- filter-tx-type
|
||||||
:* ::%spawn
|
:* ::%spawn
|
||||||
@ -872,6 +871,7 @@
|
|||||||
=/ initial-state state
|
=/ initial-state state
|
||||||
=/ ship-list rut-ship-list
|
=/ ship-list rut-ship-list
|
||||||
=/ suc-map (make-success-map make-event-list)
|
=/ suc-map (make-success-map make-event-list)
|
||||||
|
~& event-jar
|
||||||
::
|
::
|
||||||
|- ^- tang
|
|- ^- tang
|
||||||
?~ ship-list ~
|
?~ ship-list ~
|
||||||
@ -927,7 +927,7 @@
|
|||||||
%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)
|
%spawn (new-point which-spawn)
|
||||||
%escape (set-escape which-escape-l2)
|
%escape (set-escape which-escape-l1)
|
||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ set-keys ^- ^state:naive
|
++ set-keys ^- ^state:naive
|
||||||
@ -1030,7 +1030,7 @@
|
|||||||
%own (~(got by default-own-keys) cur-ship)
|
%own (~(got by default-own-keys) cur-ship)
|
||||||
%manage (~(got by default-manage-keys) cur-ship)
|
%manage (~(got by default-manage-keys) cur-ship)
|
||||||
==
|
==
|
||||||
%wrong-key
|
%wrong-key :: if not owner then use wrong key
|
||||||
state
|
state
|
||||||
::
|
::
|
||||||
++ def-args
|
++ def-args
|
||||||
@ -1075,6 +1075,7 @@
|
|||||||
==
|
==
|
||||||
::
|
::
|
||||||
++ which-escape-l1 ^- ship
|
++ which-escape-l1 ^- ship
|
||||||
|
:: currently unused
|
||||||
:: escaping to a L1 point
|
:: escaping to a L1 point
|
||||||
?- rank.cur-event
|
?- rank.cur-event
|
||||||
%galaxy ~red
|
%galaxy ~red
|
||||||
@ -1514,8 +1515,7 @@
|
|||||||
=^ f state (n state (escape-accepted:l1 ~rigred ~rabsum-ravtyd))
|
=^ f state (n state (escape-accepted:l1 ~rigred ~rabsum-ravtyd))
|
||||||
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
||||||
::
|
::
|
||||||
++ test-l1-adoption-on-l2-wrong-key-or-nonce
|
++ test-rut-l1-adoption-on-l2-wrong-key-or-nonce
|
||||||
:: this is really bad
|
|
||||||
=/ rr-escape [[~rabsum-ravtyd %own] %escape ~rigred]
|
=/ rr-escape [[~rabsum-ravtyd %own] %escape ~rigred]
|
||||||
=/ rr-adopt [rigred-own %adopt ~rabsum-ravtyd]
|
=/ rr-adopt [rigred-own %adopt ~rabsum-ravtyd]
|
||||||
::
|
::
|
||||||
@ -1525,7 +1525,7 @@
|
|||||||
::
|
::
|
||||||
!>
|
!>
|
||||||
=| =^state:naive
|
=| =^state:naive
|
||||||
=^ f state (init-red-full state)
|
=^ f state (init-rut-full state)
|
||||||
=^ f state (n state %bat q:(gen-tx 1 rr-escape %wrong-key))
|
=^ f state (n state %bat q:(gen-tx 1 rr-escape %wrong-key))
|
||||||
=^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0))
|
=^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0))
|
||||||
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
||||||
@ -1535,7 +1535,7 @@
|
|||||||
::
|
::
|
||||||
!>
|
!>
|
||||||
=| =^state:naive
|
=| =^state:naive
|
||||||
=^ f state (init-red-full state)
|
=^ f state (init-rut-full state)
|
||||||
=^ f state (n state %bat q:(gen-tx 999 rr-escape %holrut-rr-key-0))
|
=^ f state (n state %bat q:(gen-tx 999 rr-escape %holrut-rr-key-0))
|
||||||
=^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0))
|
=^ f state (n state %bat q:(gen-tx 0 rr-adopt %rigred-key-0))
|
||||||
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
[escape.net sponsor.net]:(~(got by points.state) ~rabsum-ravtyd)
|
||||||
|
Loading…
Reference in New Issue
Block a user