Major update! Added support for FantomCoin blocks

This commit is contained in:
CliffordST
2014-07-03 14:31:22 +04:00
parent 71f1a6d8c2
commit 8c6c331544
13 changed files with 565 additions and 21 deletions

View File

@@ -45,6 +45,16 @@ namespace crypto {
tree_hash(reinterpret_cast<const char (*)[HASH_SIZE]>(hashes), count, reinterpret_cast<char *>(&root_hash));
}
inline void tree_branch(const hash* hashes, std::size_t count, hash* branch)
{
tree_branch(reinterpret_cast<const char (*)[HASH_SIZE]>(hashes), count, reinterpret_cast<char (*)[HASH_SIZE]>(branch));
}
inline void tree_hash_from_branch(const hash* branch, std::size_t depth, const hash& leaf, const void* path, hash& root_hash)
{
tree_hash_from_branch(reinterpret_cast<const char (*)[HASH_SIZE]>(branch), depth, reinterpret_cast<const char*>(&leaf), path, reinterpret_cast<char*>(&root_hash));
}
}
CRYPTO_MAKE_HASHABLE(hash)