naive: l1 key change test

This commit is contained in:
drbeefsupreme 2021-04-28 15:29:20 -04:00
parent fe8150f395
commit 7f1e21d3d5
No known key found for this signature in database
GPG Key ID: B70D5683DE7F9EFC

View File

@ -369,6 +369,19 @@
=^ f state (n state (changed-voting-proxy:l1 ~bud 0x123)) =^ f state (n state (changed-voting-proxy:l1 ~bud 0x123))
voting-proxy.own:(~(got by points.state) ~bud) voting-proxy.own:(~(got by points.state) ~bud)
:: ::
++ test-l1-changed-keys ^- tang
=/ encrypt (shax 'Your eyes dont see, you do.')
=/ auth (shax 'We think much less than we think we think.')
=/ new-keys [~bud encrypt auth 1 1]
%+ expect-eq
!> (pass-from-eth:naive 32^encrypt 32^auth 1)
::
!>
=| =^state:naive
=^ f state (init-bud state)
=^ f state (n state (changed-keys:l1 new-keys))
pass.net:(~(got by points.state) ~bud)
::
++ test-l2-set-spawn-proxy ^- tang ++ test-l2-set-spawn-proxy ^- tang
%+ expect-eq %+ expect-eq
!> [0x123 0] !> [0x123 0]
@ -455,6 +468,7 @@
=^ f state (n state %bat q:(configure-keys:l2 new-keys-mgt)) =^ f state (n state %bat q:(configure-keys:l2 new-keys-mgt))
pass.net:(~(got by points.state) ~marbud) pass.net:(~(got by points.state) ~marbud)
:: ::
:: TODO: make sure nobody else can change these keys
== ==
:: ::
++ test-dopbud-l2-spawn ^- tang ++ test-dopbud-l2-spawn ^- tang