diff options
author | Linus Nordberg <linus@nordberg.se> | 2014-04-21 19:52:30 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2014-04-21 19:52:30 +0200 |
commit | d5eb39105e320d5d830f2df6e5f38c5385e4c5be (patch) | |
tree | 46f2d8b46c1be4a2e4b9d314c299f84e2e2a3302 | |
parent | 285c44c882a50cdd43d4734dce2dc7be70329afe (diff) |
Add placeholder for audit_path/2.
-rw-r--r-- | src/ht.erl | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -14,7 +14,8 @@ -type inner() :: #inner{}. -export_type([head/0, tree/0, inner/0, leaf/0]). --export([create/1, append/2, tree_hash/1, tree_version/1]). +-export([create/1, append/2, tree_hash/1, tree_version/1, + audit_path/2]). %% Public interface. -spec create(iolist() | binary()) -> head(). @@ -71,6 +72,14 @@ append(Dest, Newtree, 0) when is_record(Dest, inner) -> append(Dest, Newtree, Depth) when is_record(Dest, inner) -> mkinner(Dest#inner.child0, append(Dest#inner.child1, Newtree, Depth - 1)). +%% @doc return a list of those hashes needed to calculate the tree +%% hash for Head given the knowledge of the hash in entry with number +%% Index. +-spec audit_path(head(), non_neg_integer()) -> list(). +audit_path(Head, Index) -> + [fixme, Head, Index]. + +%%%%%%%%%%%%%%%%%%%% %% Private functions. -spec mkhead(non_neg_integer(), tree()) -> head(); |