updates the |snap:dawn gates to produce units

This commit is contained in:
Joe Bryan 2018-12-07 02:06:54 -05:00
parent 4508aa9c95
commit 5bedf98b77
2 changed files with 19 additions and 17 deletions

View File

@ -8361,14 +8361,18 @@
:: ::
++ bloq ++ bloq
|= snap=snapshot:jael |= snap=snapshot:jael
^- @ud ^- (unit @ud)
=- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
latest-block.snap latest-block.snap
:: +czar:snap:dawn: extract galaxy table :: +czar:snap:dawn: extract galaxy table
:: ::
++ czar ++ czar
|= snap=snapshot:jael |= snap=snapshot:jael
^- (map ship [=life =pass]) ^- (unit (map ship [=life =pass]))
%- malt =- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
%- ~(gas by *(map ship [=life =pass]))
%+ turn (gulf 0 255) %+ turn (gulf 0 255)
|= gal=@ |= gal=@
^- [ship [life pass]] ^- [ship [life pass]]
@ -8379,26 +8383,24 @@
:: ::
++ hull ++ hull
|= [who=ship snap=snapshot:jael] |= [who=ship snap=snapshot:jael]
^- hull:constitution:ethe ^- (unit hull:constitution:ethe)
=/ res (~(get by hul.eth.snap) who) (~(get by hul.eth.snap) who)
?~ res
~& ['hull not found in snapshot; can\'t verify' who=who]
!!
u.res
:: +turf:snap:dawn: extract network domains :: +turf:snap:dawn: extract network domains
:: ::
++ turf ++ turf
|= snap=snapshot:jael |= snap=snapshot:jael
^- (list ^turf) ^- (unit (list ^turf))
=- ?:(?=(%| -.out) ~ (some p.out))
^= out %- mule |.
%+ murn %+ murn
^- (list (pair)) ^- (list host:eyre)
%+ murn %+ murn
^- (list @t) ^- (list @t)
~[pri sec ter]:dns.eth.snap ~[pri sec ter]:dns.eth.snap
|= dom=@t |= dom=@t
^- (unit (pair)) ^- (unit host:eyre)
(rush dom thos:de-purl:html) (rush dom thos:de-purl:html)
|=([* a=*] ((soft ^turf) a)) |=(a=host:eyre ?:(?=(%| -.a) ~ (some p.a)))
-- --
:: +veri:dawn: validate keys, life, discontinuity, &c :: +veri:dawn: validate keys, life, discontinuity, &c
:: ::

View File

@ -189,22 +189,22 @@
:: ::
++ test-snap-bloq ++ test-snap-bloq
%+ expect-eq %+ expect-eq
!> 4.230.000 !> [~ 4.230.000]
!> (bloq:snap:dawn snap) !> (bloq:snap:dawn snap)
:: ::
++ test-snap-hull ++ test-snap-hull
%+ expect-eq %+ expect-eq
!> hul !> [~ hul]
!> (hull:snap:dawn ~zod snap) !> (hull:snap:dawn ~zod snap)
:: ::
++ test-snap-czar ++ test-snap-czar
%+ expect-eq %+ expect-eq
!> 256 !> 256
!> ~(wyt by (czar:snap:dawn snap)) !> ~(wyt by (need (czar:snap:dawn snap)))
:: ::
++ test-snap-turf ++ test-snap-turf
%+ expect-eq %+ expect-eq
!> `(list turf)`~[~['org' 'urbit'] ~['org' 'urbit']] !> [~ `(list turf)`~[~['org' 'urbit'] ~['org' 'urbit']]]
!> (turf:snap:dawn snap) !> (turf:snap:dawn snap)
:: ::
++ test-veri-good ++ test-veri-good