diff options
author | Alex Auvolat <alex@adnab.me> | 2018-11-05 15:03:31 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-11-05 15:03:31 +0100 |
commit | 72906c6bb473ea605235c84b6d01c318f7b6cef8 (patch) | |
tree | 904bb90dea4642ccce55a20145a2349f4f7aaf25 /shard/lib/data/merkletree.ex | |
parent | a26dd9284352000cca6338b68c03594dcd900494 (diff) | |
download | shard-72906c6bb473ea605235c84b6d01c318f7b6cef8.tar.gz shard-72906c6bb473ea605235c84b6d01c318f7b6cef8.zip |
File shard quite complete (but not perfect)
Diffstat (limited to 'shard/lib/data/merkletree.ex')
-rw-r--r-- | shard/lib/data/merkletree.ex | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shard/lib/data/merkletree.ex b/shard/lib/data/merkletree.ex index 90361a3..73679cf 100644 --- a/shard/lib/data/merkletree.ex +++ b/shard/lib/data/merkletree.ex @@ -5,8 +5,8 @@ defmodule SData.MerkleTree do alias SData.PageStore, as: Store - @block_size 4096 - @tree_arity 64 + @block_size 8192 + @tree_arity 256 defstruct [:root, :store] @@ -25,6 +25,13 @@ defmodule SData.MerkleTree do end @doc""" + Get the block size used by merkle trees + """ + def block_size() do + @block_size + end + + @doc""" Create a Merkle tree for indexing a file. """ def create(file, store \\ SData.LocalStore.new()) do |