From 54935ece34e0f3a5ccdfddee0baea0fe33b818a7 Mon Sep 17 00:00:00 2001 From: ryjm Date: Thu, 29 Jul 2021 14:28:16 -0400 Subject: [PATCH] dm-hook: reload agents on dm-hook state change This fixes the %notify bug that prevented dms from coming through. --- pkg/arvo/app/dm-hook.hoon | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkg/arvo/app/dm-hook.hoon b/pkg/arvo/app/dm-hook.hoon index 9725b13cf5..e22c91b428 100644 --- a/pkg/arvo/app/dm-hook.hoon +++ b/pkg/arvo/app/dm-hook.hoon @@ -13,16 +13,18 @@ :: +$ state-0 [%0 base-state-0] +$ state-1 [%1 base-state-0] ++$ state-2 [%2 base-state-0] +$ versioned-state $% state-0 state-1 + state-2 == +$ card card:agent:gall +$ nodes (map index:store node:store) ++ orm orm:store -- :: -=| state-1 +=| state-2 =* state - %- agent:dbug ^- agent:gall @@ -90,12 +92,23 @@ :: ++ on-save !>(state) ++ on-load - |= =vase + |= =old=vase ^- (quip card _this) - =+ !<(old=versioned-state vase) - ?: ?=(%1 -.old) `this(state old) - :_ this(state [%1 +.old]) - (poke-self:pass noun+!>(%reinit))^~ + =+ !<(old=versioned-state old-vase) + =| cards=(list card) + |- + ?- -.old + %0 + %_($ -.old %1) + %1 + %_ $ + -.old %2 + cards (weld cards (poke-our:pass %goad noun+!>(%force))^~) + == + %2 + :_ this(state old) + (weld cards (poke-self:pass noun+!>(%reinit))^~) + == :: ++ on-poke |= [=mark =vase]