summaryrefslogtreecommitdiff
path: root/src/ht.erl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-09-10 10:18:17 +0200
committerLinus Nordberg <linus@nordberg.se>2014-09-10 10:18:17 +0200
commit954891913f8b79edac8202adb69c6e850e56cf5a (patch)
tree49739b24b1ed3d6d71c3df26edeb70579425c056 /src/ht.erl
parentd7ea7565551b90c15cc3a2cbc86c15262b8617f2 (diff)
Add fun specs.
Diffstat (limited to 'src/ht.erl')
-rw-r--r--src/ht.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ht.erl b/src/ht.erl
index 749bc9e..a2f64f9 100644
--- a/src/ht.erl
+++ b/src/ht.erl
@@ -101,8 +101,11 @@ add(#history_tree{version = V, store = Store}, Entry) ->
#inner{index = LeafIndex, layer = 0,
hash = LeafHash})}.
+-spec tree_hash(history_tree()) -> binary().
tree_hash(Tree) ->
tree_hash(Tree, Tree#history_tree.version).
+
+-spec tree_hash(history_tree(), integer()) -> binary().
tree_hash(_, -1) ->
hash("");
tree_hash(Tree, Version) ->