From 8d3f631d84cc732e4064dcb65929bc3e802dc4bc Mon Sep 17 00:00:00 2001 From: Mark Allen Date: Tue, 17 Nov 2015 22:07:28 -0600 Subject: [PATCH] Oops. Accidentally left this out. --- include/machi_merkle_tree.hrl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 include/machi_merkle_tree.hrl diff --git a/include/machi_merkle_tree.hrl b/include/machi_merkle_tree.hrl new file mode 100644 index 0000000..19e6748 --- /dev/null +++ b/include/machi_merkle_tree.hrl @@ -0,0 +1,20 @@ +%% machi merkle tree records + +-record(naive, { + chunk_size = 1048576 :: pos_integer(), %% default 1 MB + recalc = true :: boolean(), + root :: 'undefined' | binary(), + lvl1 = [] :: [ binary() ], + lvl2 = [] :: [ binary() ], + lvl3 = [] :: [ binary() ], + leaves = [] :: [ { Offset :: pos_integer(), + Size :: pos_integer(), + Csum :: binary()} ] + }). + +-record(mt, { + filename :: string(), + tree :: #naive{}|merklet:tree(), + backend = 'merklet' :: 'naive'|'merklet' + }). +