naive: %transfer-point tests

This commit is contained in:
drbeefsupreme 2021-06-10 15:59:38 -04:00
parent 3c2daa06b4
commit 1b6d81a0c8
No known key found for this signature in database
GPG Key ID: B70D5683DE7F9EFC

View File

@ -436,7 +436,9 @@
(cury filter-nonce %.y) (cury filter-nonce %.y)
%- cury %- cury
:- filter-tx-type :- filter-tx-type
:* %set-management-proxy :* %transfer-point
%configure-keys
%set-management-proxy
%set-spawn-proxy %set-spawn-proxy
%set-transfer-proxy %set-transfer-proxy
~ ~
@ -495,8 +497,8 @@
|^ ^- skim-tx:naive |^ ^- skim-tx:naive
?+ tx-type.event !! ?+ tx-type.event !!
:: %spawn :: %spawn
:: %transfer-point %transfer-point [%transfer-point (addr %transfer-test) |]
:: %configure-keys [%configure-keys encr auth 1 |] %configure-keys [%configure-keys encr auth suit |]
:: %escape :: %escape
:: %cancel-escape :: %cancel-escape
:: %adopt :: %adopt
@ -507,6 +509,10 @@
%set-transfer-proxy [%set-transfer-proxy (addr %proxy-test)] %set-transfer-proxy [%set-transfer-proxy (addr %proxy-test)]
== ==
:: ::
++ encr (shax 'You will forget that you ever read this sentence.')
++ auth (shax 'You cant know that this sentence is true.')
++ suit 1
::
:: ++ which-ship :: ++ which-ship
:: :: should only matter for spawn and sponsorship actions :: :: should only matter for spawn and sponsorship actions
:: ?+ ship !! :: ?+ ship !!
@ -676,9 +682,9 @@
?~ ship-list ~ ?~ ship-list ~
%+ weld $(ship-list t.ship-list) %+ weld $(ship-list t.ship-list)
=/ cur-ship i.ship-list =/ cur-ship i.ship-list
::
%+ category (scow %p cur-ship) %+ category (scow %p cur-ship)
=/ current-events (~(get ja event-jar) cur-ship) =/ current-events (~(get ja event-jar) cur-ship)
::
|- ^- tang |- ^- tang
?~ current-events ~ ?~ current-events ~
%+ weld $(current-events t.current-events) %+ weld $(current-events t.current-events)
@ -693,11 +699,11 @@
!> (~(got by suc-map) cur-event) !> (~(got by suc-map) cur-event)
:: ::
!> !>
|^ |^ ^- ?
=^ f =^ f
state state
%- n %- n
:+ initial-state ::state? :+ state
%bat %bat
=< q =< q
%- gen-tx %- gen-tx
@ -706,22 +712,34 @@
(rut-default-args cur-ship cur-event) (rut-default-args cur-ship cur-event)
(~(got by default-own-keys) cur-ship) (~(got by default-own-keys) cur-ship)
?+ tx-type.cur-event !! ?+ tx-type.cur-event !!
%transfer-point check-xfer-point
%configure-keys check-conf-keys
%set-management-proxy check-mgmt-proxy %set-management-proxy check-mgmt-proxy
%set-spawn-proxy check-spwn-proxy %set-spawn-proxy check-spwn-proxy
%set-transfer-proxy check-xfer-proxy %set-transfer-proxy check-xfer-proxy
== ==
:: ::
++ check-mgmt-proxy ++ check-xfer-point ^- ?
.= =< address.owner.own
(~(got by points.state) cur-ship)
(addr %transfer-test)
::
++ check-conf-keys ^- ?
.= =< |1:keys.net
(~(got by points.state) cur-ship)
[suit auth encr]
::
++ check-mgmt-proxy ^- ?
.= =< address.management-proxy.own .= =< address.management-proxy.own
(~(got by points.state) cur-ship) (~(got by points.state) cur-ship)
(addr %proxy-test) (addr %proxy-test)
:: ::
++ check-spwn-proxy ++ check-spwn-proxy ^- ?
.= =< address.spawn-proxy.own .= =< address.spawn-proxy.own
(~(got by points.state) cur-ship) (~(got by points.state) cur-ship)
(addr %proxy-test) (addr %proxy-test)
:: ::
++ check-xfer-proxy ++ check-xfer-proxy ^- ?
.= =< address.transfer-proxy.own .= =< address.transfer-proxy.own
(~(got by points.state) cur-ship) (~(got by points.state) cur-ship)
(addr %proxy-test) (addr %proxy-test)