From 70bde9353bf94aef8099c1b74cbb7ce1cc1c8653 Mon Sep 17 00:00:00 2001 From: jeffro256 Date: Sat, 26 Apr 2025 15:36:17 -0500 Subject: [PATCH] carrot_impl: rename make_pruned_transaction_from_proposal_v1 --- src/carrot_impl/carrot_tx_builder_utils.cpp | 6 +++--- src/carrot_impl/carrot_tx_builder_utils.h | 2 +- tests/unit_tests/carrot_impl.cpp | 2 +- tests/unit_tests/tx_construction_helpers.cpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/carrot_impl/carrot_tx_builder_utils.cpp b/src/carrot_impl/carrot_tx_builder_utils.cpp index e2618a02b..d5498bf5a 100644 --- a/src/carrot_impl/carrot_tx_builder_utils.cpp +++ b/src/carrot_impl/carrot_tx_builder_utils.cpp @@ -514,7 +514,7 @@ void make_signable_tx_hash_from_proposal_v1(const CarrotTransactionProposalV1 &t // HW devices will need to implement this function to sign tx proposals, and most of these devices don't have a lot of memory cryptonote::transaction pruned_tx; - make_pruned_transaction_from_carrot_proposal_v1(tx_proposal, + make_pruned_transaction_from_proposal_v1(tx_proposal, s_view_balance_dev, k_view_dev, pruned_tx); @@ -528,7 +528,7 @@ void make_signable_tx_hash_from_proposal_v1(const CarrotTransactionProposalV1 &t signable_tx_hash_out = rct::rct2hash(signable_tx_hash_k); } //------------------------------------------------------------------------------------------------------------------- -void make_pruned_transaction_from_carrot_proposal_v1(const CarrotTransactionProposalV1 &tx_proposal, +void make_pruned_transaction_from_proposal_v1(const CarrotTransactionProposalV1 &tx_proposal, const view_balance_secret_device *s_view_balance_dev, const view_incoming_key_device *k_view_dev, cryptonote::transaction &pruned_tx_out) @@ -560,7 +560,7 @@ void make_pruned_transaction_from_carrot_proposal_v1(const CarrotTransactionProp std::vector sorted_extra; pruned_tx_out.extra.insert(pruned_tx_out.extra.end(), tx_proposal.extra.cbegin(), tx_proposal.extra.cend()); CHECK_AND_ASSERT_THROW_MES(cryptonote::sort_tx_extra(pruned_tx_out.extra, sorted_extra), - "make_pruned_transaction_from_carrot_proposal_v1: failed to sort "); + "make_pruned_transaction_from_proposal_v1: failed to sort tx extra"); pruned_tx_out.extra = std::move(sorted_extra); } } diff --git a/src/carrot_impl/carrot_tx_builder_utils.h b/src/carrot_impl/carrot_tx_builder_utils.h index e8ce1ad37..77ae6124d 100644 --- a/src/carrot_impl/carrot_tx_builder_utils.h +++ b/src/carrot_impl/carrot_tx_builder_utils.h @@ -119,7 +119,7 @@ void make_signable_tx_hash_from_proposal_v1(const CarrotTransactionProposalV1 &t const view_incoming_key_device *k_view_dev, crypto::hash &signable_tx_hash_out); -void make_pruned_transaction_from_carrot_proposal_v1(const CarrotTransactionProposalV1 &tx_proposal, +void make_pruned_transaction_from_proposal_v1(const CarrotTransactionProposalV1 &tx_proposal, const view_balance_secret_device *s_view_balance_dev, const view_incoming_key_device *k_view_dev, cryptonote::transaction &pruned_tx_out); diff --git a/tests/unit_tests/carrot_impl.cpp b/tests/unit_tests/carrot_impl.cpp index 5a7a79378..8900a8c32 100644 --- a/tests/unit_tests/carrot_impl.cpp +++ b/tests/unit_tests/carrot_impl.cpp @@ -165,7 +165,7 @@ static void subtest_multi_account_transfer_over_transaction(const unittest_trans // make unsigned transaction cryptonote::transaction tx; - make_pruned_transaction_from_carrot_proposal_v1(tx_proposal, + make_pruned_transaction_from_proposal_v1(tx_proposal, &ss_keys.s_view_balance_dev, &ss_keys.k_view_incoming_dev, tx); diff --git a/tests/unit_tests/tx_construction_helpers.cpp b/tests/unit_tests/tx_construction_helpers.cpp index 7e7486938..70a176dd2 100644 --- a/tests/unit_tests/tx_construction_helpers.cpp +++ b/tests/unit_tests/tx_construction_helpers.cpp @@ -432,7 +432,7 @@ cryptonote::transaction construct_carrot_pruned_transaction_fake_inputs( tx_proposal); cryptonote::transaction tx; - carrot::make_pruned_transaction_from_carrot_proposal_v1(tx_proposal, + carrot::make_pruned_transaction_from_proposal_v1(tx_proposal, /*s_view_balance_dev=*/nullptr, &k_view_dev, tx);