diff --git a/src/fcmp_pp/curve_trees.cpp b/src/fcmp_pp/curve_trees.cpp index 0bae50696..fd249db51 100644 --- a/src/fcmp_pp/curve_trees.cpp +++ b/src/fcmp_pp/curve_trees.cpp @@ -644,8 +644,7 @@ static typename fcmp_pp::curve_trees::LayerReduction get_next_layer_re // CurveTrees public member functions //---------------------------------------------------------------------------------------------------------------------- template<> -CurveTrees::LeafTuple CurveTrees::leaf_tuple( - const OutputPair &output_pair) const +CurveTrees::LeafTuple CurveTrees::leaf_tuple(const OutputPair &output_pair) const { const crypto::public_key &output_pubkey = output_pair.output_pubkey; const rct::key &commitment = output_pair.commitment; diff --git a/src/fcmp_pp/curve_trees.h b/src/fcmp_pp/curve_trees.h index 1c551e22e..9214740b4 100644 --- a/src/fcmp_pp/curve_trees.h +++ b/src/fcmp_pp/curve_trees.h @@ -164,12 +164,15 @@ template class CurveTrees { public: - CurveTrees(std::unique_ptr &&c1, std::unique_ptr &&c2, const uint64_t c1_width, const uint64_t c2_width): - m_c1{std::move(c1)}, - m_c2{std::move(c2)}, - m_c1_width{c1_width}, - m_c2_width{c2_width}, - m_leaf_layer_chunk_width{LEAF_TUPLE_SIZE * c2_width} + CurveTrees(std::unique_ptr &&c1, + std::unique_ptr &&c2, + const std::size_t c1_width, + const std::size_t c2_width): + m_c1{std::move(c1)}, + m_c2{std::move(c2)}, + m_c1_width{c1_width}, + m_c2_width{c2_width}, + m_leaf_layer_chunk_width{LEAF_TUPLE_SIZE * c2_width} { assert(c1_width > 0); assert(c2_width > 0); @@ -240,7 +243,7 @@ public: //member functions public: // Convert output pairs into leaf tuples, from {output pubkey,commitment} -> {O,C} -> {O.x,I.x,C.x} - LeafTuple leaf_tuple(const OutputPair &outpout_pair) const; + LeafTuple leaf_tuple(const OutputPair &output_pair) const; // Flatten leaves [(O.x, I.x, C.x),(O.x, I.x, C.x),...] -> [O.x, I.x, C.x, O.x, I.x, C.x...] std::vector flatten_leaves(std::vector &&leaves) const; diff --git a/src/fcmp_pp/fcmp_pp_rust/fcmp++.h b/src/fcmp_pp/fcmp_pp_rust/fcmp++.h index 34d019fc9..1e767f9d0 100644 --- a/src/fcmp_pp/fcmp_pp_rust/fcmp++.h +++ b/src/fcmp_pp/fcmp_pp_rust/fcmp++.h @@ -1,10 +1,12 @@ -namespace fcmp_pp_rust { #include #include #include #include #include + +namespace fcmp_pp_rust +{ // ----- deps C bindings ----- /// Inner integer type that the [`Limb`] newtype wraps. @@ -137,5 +139,4 @@ CResult hash_trim_selene(SelenePoint existing_hash, SeleneScalar child_to_grow_back); } // extern "C" - -} +}//namespace fcmp_pp diff --git a/src/fcmp_pp/fcmp_pp_rust/src/lib.rs b/src/fcmp_pp/fcmp_pp_rust/src/lib.rs index cb256f14f..4d9c37c75 100644 --- a/src/fcmp_pp/fcmp_pp_rust/src/lib.rs +++ b/src/fcmp_pp/fcmp_pp_rust/src/lib.rs @@ -152,6 +152,7 @@ pub extern "C" fn hash_grow_helios( if let Some(hash) = hash { CResult::ok(hash) } else { + // TODO: return defined error here: https://github.com/monero-project/monero/pull/9436#discussion_r1720477391 CResult::err(()) } } @@ -174,6 +175,7 @@ pub extern "C" fn hash_trim_helios( if let Some(hash) = hash { CResult::ok(hash) } else { + // TODO: return defined error here: https://github.com/monero-project/monero/pull/9436#discussion_r1720477391 CResult::err(()) } } @@ -196,6 +198,7 @@ pub extern "C" fn hash_grow_selene( if let Some(hash) = hash { CResult::ok(hash) } else { + // TODO: return defined error here: https://github.com/monero-project/monero/pull/9436#discussion_r1720477391 CResult::err(()) } } @@ -218,6 +221,7 @@ pub extern "C" fn hash_trim_selene( if let Some(hash) = hash { CResult::ok(hash) } else { + // TODO: return defined error here: https://github.com/monero-project/monero/pull/9436#discussion_r1720477391 CResult::err(()) } }