sorpaas / bm

Binary merkle tree implementation.
Apache License 2.0
15 stars 2 forks source link

Move MerkleDB::Digest into type parameter #5

Closed sorpaas closed 5 years ago

sorpaas commented 5 years ago

Decided not to do this in 0.2.0 because it's probably better to "pin" a Digest to a MerkleDB. This makes sure it always behave as expect -- we will never know whether a weak hashing algorithm is used or other constraints by the DB.

For a DB to be generic over Digest, one only need PhantomData, even in the case where we need to store multi-hash merkles.