From 9639bfe1b555d0b921ab6161c1c998fc75d53703 Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 23 Jul 2019 11:13:28 -0700 Subject: [PATCH 1/2] always send update notification from :dns[bind->collector] --- pkg/arvo/app/dns-bind.hoon | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/app/dns-bind.hoon b/pkg/arvo/app/dns-bind.hoon index a96464558a..b613a6a948 100644 --- a/pkg/arvo/app/dns-bind.hoon +++ b/pkg/arvo/app/dns-bind.hoon @@ -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) :: From 0d4497714bba5b6e368e4e78eafed545bde756ad Mon Sep 17 00:00:00 2001 From: Joe Bryan Date: Tue, 23 Jul 2019 11:42:51 -0700 Subject: [PATCH 2/2] adds manual :dns-collector|complete, fixes no-op condition --- pkg/arvo/app/dns-collector.hoon | 3 ++- pkg/arvo/gen/dns-collector/complete.hoon | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 pkg/arvo/gen/dns-collector/complete.hoon diff --git a/pkg/arvo/app/dns-collector.hoon b/pkg/arvo/app/dns-collector.hoon index bf34721c55..d2614b39cb 100644 --- a/pkg/arvo/app/dns-collector.hoon +++ b/pkg/arvo/app/dns-collector.hoon @@ -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]) diff --git a/pkg/arvo/gen/dns-collector/complete.hoon b/pkg/arvo/gen/dns-collector/complete.hoon new file mode 100644 index 0000000000..f70f109342 --- /dev/null +++ b/pkg/arvo/gen/dns-collector/complete.hoon @@ -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]