aboutsummaryrefslogtreecommitdiff
path: root/shard/lib/data/merklesearchtree.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-09-26 15:26:06 +0200
committerAlex Auvolat <alex@adnab.me>2018-09-26 15:26:06 +0200
commit7d0009d83c9b5c747d4adb535817924762429f30 (patch)
tree59b368cf189fc10976337e8caf4e6b623d69a04b /shard/lib/data/merklesearchtree.ex
parentf16973d3a492ae6d4890c40d77b0a93d3293bf3a (diff)
downloadshard-7d0009d83c9b5c747d4adb535817924762429f30.tar.gz
shard-7d0009d83c9b5c747d4adb535817924762429f30.zip
Make it work, including Web interface
Diffstat (limited to 'shard/lib/data/merklesearchtree.ex')
-rw-r--r--shard/lib/data/merklesearchtree.ex7
1 files changed, 5 insertions, 2 deletions
diff --git a/shard/lib/data/merklesearchtree.ex b/shard/lib/data/merklesearchtree.ex
index 49d54a5..e646774 100644
--- a/shard/lib/data/merklesearchtree.ex
+++ b/shard/lib/data/merklesearchtree.ex
@@ -301,8 +301,11 @@ defmodule SData.MerkleSearchTree do
case root do
nil -> []
_ ->
- %Page{ level: _, low: low, list: lst } = Store.get(s.store, root)
- last_aux(s, low, lst, top_bound, num)
+ case Store.get(s.store, root) do
+ nil -> []
+ %Page{ level: _, low: low, list: lst } ->
+ last_aux(s, low, lst, top_bound, num)
+ end
end
end