summaryrefslogtreecommitdiff
path: root/src/db.hrl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2014-09-27 15:45:14 +0200
committerLinus Nordberg <linus@nordberg.se>2014-09-29 10:21:56 +0200
commitb676b219edbc7f743dc4e186433a48e36424723a (patch)
tree3c527ffb679bada1ab0c9a746bf02b2868ad8514 /src/db.hrl
parentf44b7bf29dc10a4dc3a13bbe8ae5ad74979517b1 (diff)
Clean up the plop interface, in preparation for a new db implementation.
Diffstat (limited to 'src/db.hrl')
-rw-r--r--src/db.hrl19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/db.hrl b/src/db.hrl
index bea9131..9e09b66 100644
--- a/src/db.hrl
+++ b/src/db.hrl
@@ -1,17 +1,10 @@
%%% Copyright (c) 2014, NORDUnet A/S.
%%% See LICENSE for licensing information.
-%% @doc What's stored in the database.
-%% 'index' is the primary key, 'entryhash' and 'mtlhash' are also
-%% indexed, see init_tables/1.
-%% NOTE: Don't change anything here without also fixing
-%% select_index/2, which depends on the order of fields.
+%% @doc What's stored in the database.
+%% 'mtlhash' and 'entryhash' are also indexed, see init_tables/1.
-record(plop, {
- index :: non_neg_integer(), % Primary key.
- entryhash :: binary(), % Hash over #plop_entry{} in mtl.
- mtlhash :: binary(), % Merkle Tree Leaf hash.
- mtl :: mtl(), % Merkle Tree Leaf.
- extra_data :: binary(), % Data not part of mtl.
- spt :: spt() % Signed Plop Timestamp.
- }).
--type plop() :: #plop{}.
+ index :: non_neg_integer(), % Primary key.
+ mtlhash :: binary(), % Merkle Tree Leaf hash.
+ entryhash :: binary(), % Hash for duplicate detection.
+ logentry :: binary()}). % Data.