summaryrefslogtreecommitdiff
path: root/src/plop.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-10-28 15:43:25 +0100
committerLinus Nordberg <linus@nordberg.se>2014-10-28 15:43:25 +0100
commit3acd182423a17338ebdcd6e8c0ad7749948f81eb (patch)
treec9e1dced042e050280f34feabe70432208cae312 /src/plop.erl
parent44e14486eed7f5dc00cc758922207e1864352cae (diff)
parentf06372dd199442110329ed8869d87c76cb16eef1 (diff)
Merge branch 'map-optimize-startup'
Diffstat (limited to 'src/plop.erl')
-rw-r--r--src/plop.erl8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plop.erl b/src/plop.erl
index 0b101be..5244144 100644
--- a/src/plop.erl
+++ b/src/plop.erl
@@ -131,12 +131,18 @@ get_logid() ->
gen_server:call(?MODULE, {get, logid}).
testing_get_pubkey() ->
gen_server:call(?MODULE, {test, pubkey}).
+
+fill_in_entry({_Index, LeafHash, notfetched}) ->
+ db:get_by_leaf_hash(LeafHash).
+
%%%%%%%%%%%%%%%%%%%%
handle_call(stop, _From, Plop) ->
{stop, normal, stopped, Plop};
handle_call({get, {index, Start, End}}, _From, Plop) ->
- {reply, db:get_by_indices(Start, End, {sorted, false}), Plop};
+ {reply, lists:map(fun (E) -> fill_in_entry(E) end,
+ db:get_by_indices(Start, End, {sorted, false})),
+ Plop};
handle_call({get, {hash, EntryHash}}, _From, Plop) ->
{reply, db:get_by_entry_hash(EntryHash), Plop};