summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-03-07 23:00:20 +0100
committerMagnus Ahltorp <map@kth.se>2015-03-07 23:00:20 +0100
commit77abd79f0909ac0eec03c04a783adcd23be078c5 (patch)
tree7722f925a70c21592c228fcc2e8ae393b2d6b61a /src
parent23a64bf71e063a548f59d4699c16f79a570339d4 (diff)
ht:init: Build tree after reading it
Diffstat (limited to 'src')
-rw-r--r--src/ht.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ht.erl b/src/ht.erl
index e90bb34..e3751ea 100644
--- a/src/ht.erl
+++ b/src/ht.erl
@@ -99,7 +99,12 @@ print_tree(HashOutputLen) ->
%% gen_server callbacks
init(Args) ->
- {ok, new(Args)}.
+ lager:info("reading tree"),
+ Tree = new(Args),
+ lager:info("building tree"),
+ UpdatedTree = update(Tree),
+ lager:info("finished"),
+ {ok, UpdatedTree}.
handle_cast(_Request, State) ->
{noreply, State}.
handle_info(_Info, State) ->