tests: fix rift/life in ames/fine tests

This commit is contained in:
yosoyubik 2023-04-23 09:40:57 +02:00
parent 79b17f03b3
commit fc22926ed6
2 changed files with 20 additions and 13 deletions

View File

@ -24,13 +24,14 @@
adult adult
:: ::
++ ames-nec-bud ++ ames-nec-bud
|= [l=[nec=@ud bud=@ud] r=[nec=@ud bud=@ud]] |= [life=[nec=@ud bud=@ud] rift=[nec=@ud bud=@ud]]
:: create ~nec :: create ~nec
:: ::
=/ nec (ames-raw ~nec) =/ nec (ames-raw ~nec)
=. now.nec ~1111.1.1 =. now.nec ~1111.1.1
=. eny.nec 0xdead.beef =. eny.nec 0xdead.beef
=. life.ames-state.nec nec.l =. life.ames-state.nec nec.life
=. rift.ames-state.nec nec.rift
=. rof.nec |=(* ``[%noun !>(*(list turf))]) =. rof.nec |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.nec nec:crypto-core =. crypto-core.ames-state.nec nec:crypto-core
=/ nec-pub pub:ex:crypto-core.ames-state.nec =/ nec-pub pub:ex:crypto-core.ames-state.nec
@ -38,9 +39,10 @@
:: create ~bud :: create ~bud
:: ::
=/ bud (ames-raw ~bud) =/ bud (ames-raw ~bud)
=. now.bud ~1111.1.1 =. now.bud ~1111.1.1
=. eny.bud 0xbeef.dead =. eny.bud 0xbeef.dead
=. life.ames-state.bud bud.l =. life.ames-state.bud bud.life
=. rift.ames-state.bud bud.rift
=. rof.bud |=(* ``[%noun !>(*(list turf))]) =. rof.bud |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.bud bud:crypto-core =. crypto-core.ames-state.bud bud:crypto-core
=/ bud-pub pub:ex:crypto-core.ames-state.bud =/ bud-pub pub:ex:crypto-core.ames-state.bud
@ -56,8 +58,8 @@
=| =peer-state:ames =| =peer-state:ames
=. -.peer-state =. -.peer-state
:* symmetric-key=bud-sym :* symmetric-key=bud-sym
life=bud.l life=bud.life
rift=bud.r rift=bud.rift
public-key=bud-pub public-key=bud-pub
sponsor=~bud sponsor=~bud
== ==
@ -70,8 +72,8 @@
=| =peer-state:ames =| =peer-state:ames
=. -.peer-state =. -.peer-state
:* symmetric-key=nec-sym :* symmetric-key=nec-sym
life=nec.l life=nec.life
rift=nec.r rift=nec.rift
public-key=nec-pub public-key=nec-pub
sponsor=~nec sponsor=~nec
== ==

View File

@ -16,6 +16,7 @@
=. now.nec ~1111.1.1 =. now.nec ~1111.1.1
=. eny.nec 0xdead.beef =. eny.nec 0xdead.beef
=. life.ames-state.nec 2 =. life.ames-state.nec 2
=. rift.ames-state.nec 0
=. rof.nec |=(* ``[%noun !>(*(list turf))]) =. rof.nec |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.nec (pit:nu:crub:crypto 512 (shaz 'nec')) =. crypto-core.ames-state.nec (pit:nu:crub:crypto 512 (shaz 'nec'))
=/ nec-pub pub:ex:crypto-core.ames-state.nec =/ nec-pub pub:ex:crypto-core.ames-state.nec
@ -24,6 +25,7 @@
=. now.bud ~1111.1.1 =. now.bud ~1111.1.1
=. eny.bud 0xbeef.dead =. eny.bud 0xbeef.dead
=. life.ames-state.bud 3 =. life.ames-state.bud 3
=. rift.ames-state.bud 0
=. rof.bud |=(* ``[%noun !>(*(list turf))]) =. rof.bud |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.bud (pit:nu:crub:crypto 512 (shaz 'bud')) =. crypto-core.ames-state.bud (pit:nu:crub:crypto 512 (shaz 'bud'))
=/ bud-pub pub:ex:crypto-core.ames-state.bud =/ bud-pub pub:ex:crypto-core.ames-state.bud
@ -32,6 +34,7 @@
=. now.marbud ~1111.1.1 =. now.marbud ~1111.1.1
=. eny.marbud 0xbeef.beef =. eny.marbud 0xbeef.beef
=. life.ames-state.marbud 4 =. life.ames-state.marbud 4
=. rift.ames-state.marbud 0
=. rof.marbud |=(* ``[%noun !>(*(list turf))]) =. rof.marbud |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.marbud (pit:nu:crub:crypto 512 (shaz 'marbud')) =. crypto-core.ames-state.marbud (pit:nu:crub:crypto 512 (shaz 'marbud'))
=/ marbud-pub pub:ex:crypto-core.ames-state.marbud =/ marbud-pub pub:ex:crypto-core.ames-state.marbud
@ -40,6 +43,7 @@
=. now.comet ~1111.1.1 =. now.comet ~1111.1.1
=. eny.comet 0xbeef.cafe =. eny.comet 0xbeef.cafe
=. life.ames-state.comet 1 =. life.ames-state.comet 1
=. rift.ames-state.comet 0
=. rof.comet |=(* ``[%noun !>(*(list turf))]) =. rof.comet |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.comet =. crypto-core.ames-state.comet
%- nol:nu:crub:crypto %- nol:nu:crub:crypto
@ -51,6 +55,7 @@
=. now.comet2 ~1111.1.1 =. now.comet2 ~1111.1.1
=. eny.comet2 0xcafe.cafe =. eny.comet2 0xcafe.cafe
=. life.ames-state.comet2 1 =. life.ames-state.comet2 1
=. rift.ames-state.comet2 0
=. rof.comet2 |=(* ``[%noun !>(*(list turf))]) =. rof.comet2 |=(* ``[%noun !>(*(list turf))])
=. crypto-core.ames-state.comet2 (pit:nu:crub:crypto 512 0v1eb4) =. crypto-core.ames-state.comet2 (pit:nu:crub:crypto 512 0v1eb4)
=/ comet2-pub pub:ex:crypto-core.ames-state.comet2 =/ comet2-pub pub:ex:crypto-core.ames-state.comet2
@ -523,7 +528,7 @@
%- zing %- zing
%+ turn (gulf 1 10) %+ turn (gulf 1 10)
|= siz=@ |= siz=@
=/ want=path /~bud/0/1/c/z/(scot %ud siz)/kids/sys =/ want=path /~bud/0/3/c/z/(scot %ud siz)/kids/sys
:: ::
=/ =beam [[~bud %$ da+now:bud] (welp /fine/hunk/1/16.384 want)] =/ =beam [[~bud %$ da+now:bud] (welp /fine/hunk/1/16.384 want)]
=/ [=mark =vase] (need (need (scry bud %x beam))) =/ [=mark =vase] (need (need (scry bud %x beam)))
@ -538,7 +543,7 @@
::%+ turn (gulf 1 50) ::%+ turn (gulf 1 50)
::|= siz=@ ::|= siz=@
::=/ want=path /~bud/0/1/c/z/(scot %ud siz)/kids/sys ::=/ want=path /~bud/0/1/c/z/(scot %ud siz)/kids/sys
=/ want=path /~bud/0/1/c/x/1/kids/app/dojo/hoon =/ want=path /~bud/0/3/c/x/1/kids/app/dojo/hoon
=/ dit (jam %hoon dojo) =/ dit (jam %hoon dojo)
=/ exp (cat 9 (fil 3 64 0xff) dit) =/ exp (cat 9 (fil 3 64 0xff) dit)
=/ siz=@ud (met 13 exp) =/ siz=@ud (met 13 exp)