diff --git a/libs/parallel-containers/include/nil/crypto3/container/merkle/proof.hpp b/libs/parallel-containers/include/nil/crypto3/container/merkle/proof.hpp index 34dad094..9fa25623 100644 --- a/libs/parallel-containers/include/nil/crypto3/container/merkle/proof.hpp +++ b/libs/parallel-containers/include/nil/crypto3/container/merkle/proof.hpp @@ -95,7 +95,7 @@ namespace nil { typedef std::array layer_type; typedef std::vector path_type; - merkle_proof_impl() : _li(0) {}; + merkle_proof_impl() : _li(0), _root(value_type()) {}; merkle_proof_impl(std::size_t li, value_type root, path_type path) : _li(li), _root(root), _path(path){}; diff --git a/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp b/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp index ac284a07..1fcf8125 100644 --- a/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp +++ b/libs/parallel-containers/include/nil/crypto3/container/merkle/tree.hpp @@ -178,6 +178,7 @@ namespace nil { typedef typename node_type::value_type value_type; constexpr static const std::size_t value_bits = node_type::value_bits; + constexpr static const std::size_t arity = Arity; typedef std::vector container_type; @@ -256,7 +257,7 @@ namespace nil { } bool operator==(const merkle_tree_impl &rhs) const { - return _hashes == rhs.val; + return _hashes == rhs._hashes; } bool operator!=(const merkle_tree_impl &rhs) const { @@ -264,7 +265,7 @@ namespace nil { } allocator_type get_allocator() const BOOST_NOEXCEPT { - return this->val.__alloc(); + return this->_hashes.__alloc(); } iterator begin() BOOST_NOEXCEPT {