@@ -314,8 +314,10 @@ void make_carrot_transaction_proposal_v1_transfer(
314314 for (const CarrotPaymentProposalVerifiableSelfSendV1 &selfsend_payment_proposal : selfsend_payment_proposals)
315315 requested_output_amount += selfsend_payment_proposal.amount ;
316316
317- CHECK_AND_ASSERT_THROW_MES (input_sum_amount >= requested_output_amount + fee,
318- " make unsigned transaction transfer subtractable: bug: input amnts not >= output amnts + fee" );
317+ // note: fee will be subbed from `requested_output_amount` or `implicit_change_amount`, failure occurs
318+ // later if there are insufficient funds for it.
319+ CHECK_AND_ASSERT_THROW_MES (input_sum_amount >= requested_output_amount,
320+ " make unsigned transaction transfer subtractable: bug: input amnts not >= output amnts" );
319321
320322 const boost::multiprecision::uint128_t implicit_change_amount = input_sum_amount - requested_output_amount;
321323
@@ -460,10 +462,9 @@ void make_carrot_transaction_proposal_v1_sweep(
460462 {
461463 CHECK_AND_ASSERT_THROW_MES (input_sum_amount >= fee,
462464 " make carrot transaction proposal v1 sweep: bug: input_sum_amount < fee" );
463- CHECK_AND_ASSERT_THROW_MES (n_normal_start == normal_payment_proposals.size (),
465+ CHECK_AND_ASSERT_THROW_MES (is_selfsend_sweep || n_normal_start == normal_payment_proposals.size (),
464466 " make carrot transaction proposal v1 sweep: bug: included dummy payment proposal" );
465467
466-
467468 // get pointers to proposal amounts and shuffle, excluding implicit selfsend
468469 const size_t n_outputs = normal_payment_proposals.size () + selfsend_payment_proposals.size ();
469470 std::vector<xmr_amount*> amount_ptrs;
0 commit comments