@@ -246,10 +246,10 @@ static carrot::InputCandidate make_input_candidate(const wallet2_basic::transfer
246
246
}
247
247
// -------------------------------------------------------------------------------------------------------------------
248
248
// -------------------------------------------------------------------------------------------------------------------
249
- std::vector<cryptonote::tx_destination_entry> finalized_destinations_ref (const tx_reconstruct_variant_t &v,
249
+ std::vector<cryptonote::tx_destination_entry> finalized_destinations (const tx_reconstruct_variant_t &v,
250
250
const carrot::view_incoming_key_device &k_view_dev)
251
251
{
252
- struct finalized_destinations_ref_visitor
252
+ struct finalized_destinations_visitor
253
253
{
254
254
std::vector<cryptonote::tx_destination_entry> operator ()(const PreCarrotTransactionProposal &p) const
255
255
{
@@ -269,13 +269,13 @@ std::vector<cryptonote::tx_destination_entry> finalized_destinations_ref(const t
269
269
270
270
const carrot::view_incoming_key_device &k_view_dev;
271
271
};
272
- return std::visit (finalized_destinations_ref_visitor {k_view_dev}, v);
272
+ return std::visit (finalized_destinations_visitor {k_view_dev}, v);
273
273
}
274
274
// -------------------------------------------------------------------------------------------------------------------
275
- cryptonote::tx_destination_entry change_destination_ref (const tx_reconstruct_variant_t &v,
275
+ cryptonote::tx_destination_entry change_destination (const tx_reconstruct_variant_t &v,
276
276
const carrot::view_incoming_key_device &k_view_dev)
277
277
{
278
- struct change_destination_ref_visitor
278
+ struct change_destination_visitor
279
279
{
280
280
cryptonote::tx_destination_entry operator ()(const PreCarrotTransactionProposal &p) const
281
281
{
@@ -290,12 +290,12 @@ cryptonote::tx_destination_entry change_destination_ref(const tx_reconstruct_var
290
290
291
291
const carrot::view_incoming_key_device &k_view_dev;
292
292
};
293
- return std::visit (change_destination_ref_visitor {k_view_dev}, v);
293
+ return std::visit (change_destination_visitor {k_view_dev}, v);
294
294
}
295
295
// -------------------------------------------------------------------------------------------------------------------
296
- rct::xmr_amount fee_ref (const tx_reconstruct_variant_t &v)
296
+ rct::xmr_amount fee (const tx_reconstruct_variant_t &v)
297
297
{
298
- struct fee_ref_visitor
298
+ struct fee_visitor
299
299
{
300
300
rct::xmr_amount operator ()(const PreCarrotTransactionProposal &p) const
301
301
{
@@ -310,12 +310,12 @@ rct::xmr_amount fee_ref(const tx_reconstruct_variant_t &v)
310
310
return p.fee ;
311
311
}
312
312
};
313
- return std::visit (fee_ref_visitor {}, v);
313
+ return std::visit (fee_visitor {}, v);
314
314
}
315
315
// -------------------------------------------------------------------------------------------------------------------
316
- std::optional<crypto::hash8> short_payment_id_ref (const tx_reconstruct_variant_t &v)
316
+ std::optional<crypto::hash8> short_payment_id (const tx_reconstruct_variant_t &v)
317
317
{
318
- struct short_payment_id_ref_visitor
318
+ struct short_payment_id_visitor
319
319
{
320
320
std::optional<crypto::hash8> operator ()(const PreCarrotTransactionProposal &p) const
321
321
{
@@ -339,10 +339,10 @@ std::optional<crypto::hash8> short_payment_id_ref(const tx_reconstruct_variant_t
339
339
return std::nullopt ;
340
340
}
341
341
};
342
- return std::visit (short_payment_id_ref_visitor {}, v);
342
+ return std::visit (short_payment_id_visitor {}, v);
343
343
}
344
344
// -------------------------------------------------------------------------------------------------------------------
345
- std::optional<crypto::hash> long_payment_id_ref (const tx_reconstruct_variant_t &v)
345
+ std::optional<crypto::hash> long_payment_id (const tx_reconstruct_variant_t &v)
346
346
{
347
347
const PreCarrotTransactionProposal *p = std::get_if<PreCarrotTransactionProposal>(&v);
348
348
if (nullptr == p)
@@ -359,9 +359,9 @@ std::optional<crypto::hash> long_payment_id_ref(const tx_reconstruct_variant_t &
359
359
return pid32;
360
360
}
361
361
// -------------------------------------------------------------------------------------------------------------------
362
- std::vector<crypto::public_key> spent_onetime_addresses_ref (const tx_reconstruct_variant_t &v)
362
+ std::vector<crypto::public_key> spent_onetime_addresses (const tx_reconstruct_variant_t &v)
363
363
{
364
- struct spent_onetime_addresses_ref_visitor
364
+ struct spent_onetime_addresses_visitor
365
365
{
366
366
std::vector<crypto::public_key> operator ()(const PreCarrotTransactionProposal &tcd) const
367
367
{
@@ -382,12 +382,12 @@ std::vector<crypto::public_key> spent_onetime_addresses_ref(const tx_reconstruct
382
382
}
383
383
};
384
384
385
- return std::visit (spent_onetime_addresses_ref_visitor {}, v);
385
+ return std::visit (spent_onetime_addresses_visitor {}, v);
386
386
}
387
387
// -------------------------------------------------------------------------------------------------------------------
388
- boost::multiprecision::uint128_t input_amount_total_ref (const tx_reconstruct_variant_t &v)
388
+ boost::multiprecision::uint128_t input_amount_total (const tx_reconstruct_variant_t &v)
389
389
{
390
- struct input_amount_total_ref_visitor
390
+ struct input_amount_total_visitor
391
391
{
392
392
boost::multiprecision::uint128_t operator ()(const PreCarrotTransactionProposal &p) const
393
393
{
@@ -407,12 +407,12 @@ boost::multiprecision::uint128_t input_amount_total_ref(const tx_reconstruct_var
407
407
return res;
408
408
}
409
409
};
410
- return std::visit (input_amount_total_ref_visitor {}, v);
410
+ return std::visit (input_amount_total_visitor {}, v);
411
411
}
412
412
// -------------------------------------------------------------------------------------------------------------------
413
- std::vector<std::uint64_t > ring_sizes_ref (const tx_reconstruct_variant_t &v)
413
+ std::vector<std::uint64_t > ring_sizes (const tx_reconstruct_variant_t &v)
414
414
{
415
- struct ring_sizes_ref_visitor
415
+ struct ring_sizes_visitor
416
416
{
417
417
std::vector<std::uint64_t > operator ()(const PreCarrotTransactionProposal &p) const
418
418
{
@@ -428,10 +428,10 @@ std::vector<std::uint64_t> ring_sizes_ref(const tx_reconstruct_variant_t &v)
428
428
return std::vector<std::uint64_t >(p.input_proposals .size ());
429
429
}
430
430
};
431
- return std::visit (ring_sizes_ref_visitor {}, v);
431
+ return std::visit (ring_sizes_visitor {}, v);
432
432
}
433
433
// -------------------------------------------------------------------------------------------------------------------
434
- std::uint64_t unlock_time_ref (const tx_reconstruct_variant_t &v)
434
+ std::uint64_t unlock_time (const tx_reconstruct_variant_t &v)
435
435
{
436
436
const PreCarrotTransactionProposal *p = std::get_if<PreCarrotTransactionProposal>(&v);
437
437
return p ? p->unlock_time : 0 ;
@@ -836,10 +836,10 @@ std::vector<std::size_t> collect_selected_transfer_indices(const tx_reconstruct_
836
836
{
837
837
const auto best_transfer_by_ota = collect_non_burned_transfers_by_onetime_address (transfers);
838
838
839
- const std::vector<crypto::public_key> spent_onetime_addresses = spent_onetime_addresses_ref (tx_construction_data);
839
+ const std::vector<crypto::public_key> spent_otas = spent_onetime_addresses (tx_construction_data);
840
840
std::vector<std::size_t > selected_transfer_indices;
841
- selected_transfer_indices.reserve (spent_onetime_addresses .size ());
842
- for (const crypto::public_key &spent_onetime_address : spent_onetime_addresses )
841
+ selected_transfer_indices.reserve (spent_otas .size ());
842
+ for (const crypto::public_key &spent_onetime_address : spent_otas )
843
843
{
844
844
const auto ota_it = best_transfer_by_ota.find (spent_onetime_address);
845
845
CARROT_CHECK_AND_THROW (ota_it != best_transfer_by_ota.cend (),
@@ -949,7 +949,7 @@ cryptonote::transaction finalize_fcmps_and_range_proofs(
949
949
// collect FCMP paths
950
950
std::vector<fcmp_pp::curve_trees::CurveTreesV1::Path> fcmp_paths;
951
951
fcmp_paths.reserve (n_inputs);
952
- for (const fcmp_pp::curve_trees::OutputPair input_pair : spent_input_pairs)
952
+ for (const fcmp_pp::curve_trees::OutputPair & input_pair : spent_input_pairs)
953
953
{
954
954
MDEBUG (" Requesting FCMP path from tree cache for onetime address " << input_pair.output_pubkey );
955
955
fcmp_pp::curve_trees::CurveTreesV1::Path &fcmp_path = fcmp_paths.emplace_back ();
0 commit comments