From 7d0009d83c9b5c747d4adb535817924762429f30 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Wed, 26 Sep 2018 15:26:06 +0200 Subject: Make it work, including Web interface --- shard/lib/data/merklesearchtree.ex | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'shard/lib/data/merklesearchtree.ex') 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 -- cgit v1.2.3