diff options
Diffstat (limited to 'lib/data/merklelist.ex')
-rw-r--r-- | lib/data/merklelist.ex | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/data/merklelist.ex b/lib/data/merklelist.ex index 357f336..9b44ee8 100644 --- a/lib/data/merklelist.ex +++ b/lib/data/merklelist.ex @@ -14,11 +14,7 @@ defmodule SData.MerkleList do @doc""" Create a Merkle list store. - `cmp` is a function that compares stored items and provides a total order. - It must return: - - `:after` if the first argument is more recent - - `:duplicate` if the two items are the same - - `:before` if the first argument is older + `cmp` is a compare function that respects the interface defined in module `SData`. """ def new(cmp) do root_item = :root @@ -144,17 +140,4 @@ defmodule SData.MerkleList do end end end - - @doc""" - Compare function for timestamped strings - """ - def cmp_ts_str({ts1, str1}, {ts2, str2}) do - cond do - ts1 > ts2 -> :after - ts1 < ts2 -> :before - str1 == str2 -> :duplicate - str1 > str2 -> :after - str1 < str2 -> :before - end - end end |