Skip to content

Commit

Permalink
sync with crypto3
Browse files Browse the repository at this point in the history
  • Loading branch information
vo-nil committed Sep 12, 2024
1 parent a4bf5ee commit d13d335
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace nil {
typedef std::array<path_element_type, Arity - 1> layer_type;
typedef std::vector<layer_type> 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){};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<value_type> container_type;

Expand Down Expand Up @@ -256,15 +257,15 @@ 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 {
return !(rhs == *this);
}

allocator_type get_allocator() const BOOST_NOEXCEPT {
return this->val.__alloc();
return this->_hashes.__alloc();
}

iterator begin() BOOST_NOEXCEPT {
Expand Down

0 comments on commit d13d335

Please sign in to comment.