summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plop.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plop.erl b/src/plop.erl
index bbfb687..81d3cc9 100644
--- a/src/plop.erl
+++ b/src/plop.erl
@@ -151,12 +151,12 @@ handle_call({consistency, {First, Second}}, _From, Plop) ->
{reply, ht:consistency(First - 1, Second - 1), Plop};
handle_call({inclusion, {Hash, TreeSize}}, _From, Plop) ->
- Proof = case db:find(Hash) of
- [] -> [];
- {plop, Index, _Hash, _MTL, _SPT} ->
- ht:path(Index, TreeSize - 1)
+ {Index, Proof} = case db:find(Hash) of
+ [] -> [];
+ {plop, I, _Hash, _MTL, _SPT} ->
+ {I, ht:path(I, TreeSize - 1)}
end,
- {reply, Proof, Plop};
+ {reply, {Index, Proof}, Plop};
handle_call({test, pubkey}, _From,
Plop = #state{pubkey = PK}) ->