From 9f0dd859e635bce785b9f20b999dc0db063a1475 Mon Sep 17 00:00:00 2001 From: j-berman Date: Thu, 8 Aug 2024 14:55:49 -0700 Subject: [PATCH] fix clang compile errors --- src/blockchain_utilities/CMakeLists.txt | 1 - src/fcmp_pp/curve_trees.cpp | 21 +++++++++++++++++++++ tests/unit_tests/serialization.cpp | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt index d6257ef99..a41cd1e53 100644 --- a/src/blockchain_utilities/CMakeLists.txt +++ b/src/blockchain_utilities/CMakeLists.txt @@ -141,7 +141,6 @@ target_link_libraries(blockchain_import PRIVATE cryptonote_core blockchain_db - fcmp_pp version epee ${Boost_FILESYSTEM_LIBRARY} diff --git a/src/fcmp_pp/curve_trees.cpp b/src/fcmp_pp/curve_trees.cpp index 50f354a9e..366462f39 100644 --- a/src/fcmp_pp/curve_trees.cpp +++ b/src/fcmp_pp/curve_trees.cpp @@ -761,6 +761,10 @@ std::vector CurveTrees::flatten_leaves(std::vector< return flattened_leaves; }; + +// Explicit instantiation +template std::vector CurveTrees::flatten_leaves( + std::vector &&leaves) const; //---------------------------------------------------------------------------------------------------------------------- template typename CurveTrees::TreeExtension CurveTrees::get_tree_extension( @@ -854,6 +858,12 @@ typename CurveTrees::TreeExtension CurveTrees::get_tree_extensio return tree_extension; }; + +// Explicit instantiation +template CurveTrees::TreeExtension CurveTrees::get_tree_extension( + const uint64_t old_n_leaf_tuples, + const LastHashes &existing_last_hashes, + std::vector &&new_leaf_tuples) const; //---------------------------------------------------------------------------------------------------------------------- template std::vector CurveTrees::get_trim_instructions( @@ -899,6 +909,11 @@ std::vector CurveTrees::get_trim_instructions( return trim_instructions; } + +// Explicit instantiation +template std::vector CurveTrees::get_trim_instructions( + const uint64_t old_n_leaf_tuples, + const uint64_t trim_n_leaf_tuples) const; //---------------------------------------------------------------------------------------------------------------------- template typename CurveTrees::TreeReduction CurveTrees::get_tree_reduction( @@ -962,6 +977,12 @@ typename CurveTrees::TreeReduction CurveTrees::get_tree_reductio return tree_reduction_out; }; + +// Explicit instantiation +template CurveTrees::TreeReduction CurveTrees::get_tree_reduction( + const std::vector &trim_instructions, + const LastChunkChildrenToTrim &children_to_trim, + const LastHashes &last_hashes) const; //---------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------- // CurveTrees private member functions diff --git a/tests/unit_tests/serialization.cpp b/tests/unit_tests/serialization.cpp index 66fc4177b..e9520c7c8 100644 --- a/tests/unit_tests/serialization.cpp +++ b/tests/unit_tests/serialization.cpp @@ -1312,7 +1312,7 @@ TEST(Serialization, tx_fcmp_pp) const std::size_t n_inputs = 2; const std::size_t n_outputs = 3; - const auto make_dummy_fcmp_pp_tx = [n_inputs, n_outputs]() -> transaction + const auto make_dummy_fcmp_pp_tx = []() -> transaction { transaction tx;