mirror of
https://github.com/urbit/shrub.git
synced 2025-01-02 17:43:32 +03:00
Merge pull request #1373 from urbit/dns-manual-redux
fixes dns notification bugs, adds manual fulfillment
This commit is contained in:
commit
bc454c8035
@ -632,12 +632,7 @@
|
||||
(json-octs u.r.httr parse-record:(provider authority))
|
||||
?~(dat ~. id.u.dat)
|
||||
::
|
||||
=/ =address:dns
|
||||
?>(?=(%direct -.target) +.target)
|
||||
=/ =turf
|
||||
(weld dom.authority /(crip +:(scow %p ship)))
|
||||
;< ~ bind:m (poke-app:stdio collector-app [%dns-complete ship address turf])
|
||||
;< now=@da bind:m get-time:stdio
|
||||
;< now=@da bind:m get-time:stdio
|
||||
=/ =bound
|
||||
[now id target ?~(existing ~ [[wen cur] hit]:u.existing)]
|
||||
(pure:m (some bound))
|
||||
@ -764,6 +759,10 @@
|
||||
?~ new
|
||||
~& [%bind-failed in-poke-data]
|
||||
(pure:m state)
|
||||
=/ =turf
|
||||
(weld dom.aut.nam /(crip +:(scow %p who)))
|
||||
;< ~ bind:m
|
||||
(poke-app:stdio collector-app [%dns-complete who +.tar turf])
|
||||
=. bon.nam (~(put by bon.nam) who u.new)
|
||||
=. nem.state (some nam)
|
||||
::
|
||||
|
@ -124,9 +124,10 @@
|
||||
=/ req=(unit address:dns) (~(get by requested.state) who)
|
||||
:: ignore established bindings that don't match requested
|
||||
::
|
||||
?: ?& ?=(^ req)
|
||||
?: ?| ?=(~ req)
|
||||
!=(adr u.req)
|
||||
==
|
||||
~& %unknown-complete
|
||||
this
|
||||
=: requested.state (~(del by requested.state) who)
|
||||
completed.state (~(put by completed.state) who [adr tuf])
|
||||
|
14
pkg/arvo/gen/dns-collector/complete.hoon
Normal file
14
pkg/arvo/gen/dns-collector/complete.hoon
Normal file
@ -0,0 +1,14 @@
|
||||
:: :dns-collector: manually "complete" (fulfill) requests
|
||||
::
|
||||
:::: /hoon/complete/dns-collector/gen
|
||||
::
|
||||
/- *dns, *sole
|
||||
/+ *generators
|
||||
:- %say
|
||||
|= $: [now=@da eny=@uvJ bec=beak]
|
||||
[who=@p addr=@if =turf ~]
|
||||
~
|
||||
==
|
||||
:- %dns-complete
|
||||
^- [ship binding]
|
||||
[who [%if addr] turf]
|
Loading…
Reference in New Issue
Block a user