summaryrefslogtreecommitdiff
path: root/src/db.hrl
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2014-05-01 18:02:31 +0200
committerLinus Nordberg <linus@nordu.net>2014-05-01 18:02:31 +0200
commit339656a35441a5d7d02282e6a5c6cdfeaf0571d6 (patch)
tree823cbe7f492c4c3f9bb8ffdc359ddefc1ffcb6e2 /src/db.hrl
parent835638e11919d2012ab74bf5e3185732e604d0ff (diff)
Move some records out of public header file. Improve db initialisation some.
Wait for mnesia tables in init() and make the init-functions do some more.
Diffstat (limited to 'src/db.hrl')
-rw-r--r--src/db.hrl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/db.hrl b/src/db.hrl
new file mode 100644
index 0000000..16b9103
--- /dev/null
+++ b/src/db.hrl
@@ -0,0 +1,8 @@
+%% @doc What's stored in the database.
+%% 'index' is the primary key, 'hash' is also indexed.
+-record(plop, {
+ index :: non_neg_integer(), % Primary key.
+ hash :: binary(), % Hash over mtl.
+ mtl :: mtl(), % Merkle Tree Leaf, an #mtl{}.
+ spt_text :: binary() % Signed Plop Timestamp, an #spt_on_wire{}.
+ }).