Skip to content

Commit

Permalink
fix clang compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
j-berman committed Aug 8, 2024
1 parent d4847f6 commit 9f0dd85
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/blockchain_utilities/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ target_link_libraries(blockchain_import
PRIVATE
cryptonote_core
blockchain_db
fcmp_pp
version
epee
${Boost_FILESYSTEM_LIBRARY}
Expand Down
21 changes: 21 additions & 0 deletions src/fcmp_pp/curve_trees.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,10 @@ std::vector<typename C2::Scalar> CurveTrees<C1, C2>::flatten_leaves(std::vector<

return flattened_leaves;
};

// Explicit instantiation
template std::vector<Selene::Scalar> CurveTrees<Helios, Selene>::flatten_leaves(
std::vector<LeafTuple> &&leaves) const;
//----------------------------------------------------------------------------------------------------------------------
template<typename C1, typename C2>
typename CurveTrees<C1, C2>::TreeExtension CurveTrees<C1, C2>::get_tree_extension(
Expand Down Expand Up @@ -854,6 +858,12 @@ typename CurveTrees<C1, C2>::TreeExtension CurveTrees<C1, C2>::get_tree_extensio

return tree_extension;
};

// Explicit instantiation
template CurveTrees<Helios, Selene>::TreeExtension CurveTrees<Helios, Selene>::get_tree_extension(
const uint64_t old_n_leaf_tuples,
const LastHashes &existing_last_hashes,
std::vector<LeafTupleContext> &&new_leaf_tuples) const;
//----------------------------------------------------------------------------------------------------------------------
template<typename C1, typename C2>
std::vector<TrimLayerInstructions> CurveTrees<C1, C2>::get_trim_instructions(
Expand Down Expand Up @@ -899,6 +909,11 @@ std::vector<TrimLayerInstructions> CurveTrees<C1, C2>::get_trim_instructions(

return trim_instructions;
}

// Explicit instantiation
template std::vector<TrimLayerInstructions> CurveTrees<Helios, Selene>::get_trim_instructions(
const uint64_t old_n_leaf_tuples,
const uint64_t trim_n_leaf_tuples) const;
//----------------------------------------------------------------------------------------------------------------------
template<typename C1, typename C2>
typename CurveTrees<C1, C2>::TreeReduction CurveTrees<C1, C2>::get_tree_reduction(
Expand Down Expand Up @@ -962,6 +977,12 @@ typename CurveTrees<C1, C2>::TreeReduction CurveTrees<C1, C2>::get_tree_reductio

return tree_reduction_out;
};

// Explicit instantiation
template CurveTrees<Helios, Selene>::TreeReduction CurveTrees<Helios, Selene>::get_tree_reduction(
const std::vector<TrimLayerInstructions> &trim_instructions,
const LastChunkChildrenToTrim &children_to_trim,
const LastHashes &last_hashes) const;
//----------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------
// CurveTrees private member functions
Expand Down
2 changes: 1 addition & 1 deletion tests/unit_tests/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9f0dd85

Please sign in to comment.