From d5e052daaa3b8ed5e339865dca5dd4bc85f0e7bc Mon Sep 17 00:00:00 2001 From: Fang Date: Tue, 13 Jun 2017 18:46:02 -0700 Subject: [PATCH] Moved init logic upstream. --- app/talk-guardian.hoon | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/app/talk-guardian.hoon b/app/talk-guardian.hoon index 21bbcd337..330dfe5dc 100644 --- a/app/talk-guardian.hoon +++ b/app/talk-guardian.hoon @@ -213,8 +213,14 @@ ::> populate state on first boot. ::> creates our default mailbox and journal. :: - ::TODO but now init it spread out over two arms? ugly! - =< (ta-delta %init ~) :: side-effects + =< %- ta-deltas :: side-effects + =+ sen=(above our.bol) + ?: ?| !=(%czar (clan sen)) + =(sen our.bol) + =(%pawn (clan our.bol)) + == + ~ + [%init ~]~ %+ roll ^- (list {security knot cord}) :~ [%brown (main our.bol) 'default home'] @@ -1168,18 +1174,11 @@ ++ da-init ::< startup side-effects ::> :: - =+ sen=(above our.bol) - ::TODO move this logic to ta-init - ?: ?| !=(%czar (clan sen)) - =(sen our.bol) - =(%pawn (clan our.bol)) - == - ..da-init %- da-emit :* 0 %peer /burden - [sen %talk-guardian] + [(above our.bol) %talk-guardian] /burden/(scot %p our.bol) == ::