summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-09-14 22:31:53 +0200
committerLinus Nordberg <linus@nordberg.se>2014-09-14 22:31:53 +0200
commitf6a02d69404fcb6486a4dfd04bbd4fecd7a0e2e8 (patch)
tree91b04236656b06975deb3201487fcc031266b013
parent77db7127e3ed985a878d44345bf4014df13743b9 (diff)
Add comments to separate public API from testing and debugging funs.
-rw-r--r--src/ht.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ht.erl b/src/ht.erl
index 9aa989f..44fb2b4 100644
--- a/src/ht.erl
+++ b/src/ht.erl
@@ -61,6 +61,7 @@ path(I, V) ->
gen_server:call(?MODULE, {path, I, V}).
consistency(V1, V2) ->
gen_server:call(?MODULE, {consistency, V1, V2}).
+%% Testing and debugging.
testing_get_state() ->
gen_server:call(?MODULE, testing_get_state).
print_tree() ->
@@ -102,6 +103,7 @@ handle_call({path, Index, Version}, _From, State) ->
handle_call({consistency, Version1, Version2}, _From, State) ->
{NewState, ConsProof} = consistency(State, Version1, Version2),
{reply, ConsProof, NewState};
+% testing and debugging
handle_call(testing_get_state, _From, State) ->
{reply, State, State};
handle_call(print_tree, _From, State) ->