summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/db.erl5
-rw-r--r--src/frontend.erl2
-rw-r--r--src/storage.erl2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/db.erl b/src/db.erl
index 19f73a6..b0c6eaa 100644
--- a/src/db.erl
+++ b/src/db.erl
@@ -57,10 +57,9 @@ add(LeafHash, Data) ->
lager:debug("leafhash ~s added", [mochihex:to_hex(LeafHash)]),
ok.
--spec add_entryhash(binary(), binary()) -> ok.
+-spec add_entryhash(binary(), binary()) -> ok | differ.
add_entryhash(LeafHash, EntryHash) ->
- ok = perm:ensurefile_nosync(entryhash_root_path(), EntryHash, LeafHash),
- ok.
+ perm:ensurefile_nosync(entryhash_root_path(), EntryHash, LeafHash).
-spec add_index_nosync(binary(), non_neg_integer()) -> ok.
add_index_nosync(LeafHash, Index) ->
diff --git a/src/frontend.erl b/src/frontend.erl
index 208b4c7..2689956 100644
--- a/src/frontend.erl
+++ b/src/frontend.erl
@@ -128,7 +128,7 @@ check_entry(LeafHash, Index) ->
{Index, LeafHash, Entry} ->
{ok, {Module, Function}} = application:get_env(plop, entryhash_from_entry),
EntryHash = Module:Function(Entry),
- ok = db:add_entryhash(LeafHash, EntryHash),
+ db:add_entryhash(LeafHash, EntryHash),
ok
end.
diff --git a/src/storage.erl b/src/storage.erl
index 9f4bb5a..e208d9b 100644
--- a/src/storage.erl
+++ b/src/storage.erl
@@ -26,7 +26,7 @@ request(post, "ct/storage/entrycommitted", Input) ->
{struct, PropList} ->
EntryHash = base64:decode(proplists:get_value(<<"entryhash">>, PropList)),
LeafHash = base64:decode(proplists:get_value(<<"treeleafhash">>, PropList)),
- ok = db:add_entryhash(LeafHash, EntryHash),
+ db:add_entryhash(LeafHash, EntryHash),
success({[{result, <<"ok">>}]})
end;
request(get, "ct/storage/fetchnewentries", _Input) ->