Electroneum
Loading...
Searching...
No Matches
tools::detail Namespace Reference

Functions

void digit_split_strategy (const std::vector< cryptonote::tx_destination_entry > &dsts, const cryptonote::tx_destination_entry &change_dst, uint64_t dust_threshold, std::vector< cryptonote::tx_destination_entry > &splitted_dsts, std::vector< cryptonote::tx_destination_entry > &dust_dsts)
void null_split_strategy (const std::vector< cryptonote::tx_destination_entry > &dsts, const cryptonote::tx_destination_entry &change_dst, uint64_t dust_threshold, std::vector< cryptonote::tx_destination_entry > &splitted_dsts, std::vector< cryptonote::tx_destination_entry > &dust_dsts)
void print_source_entry (const cryptonote::tx_source_entry &src)

Function Documentation

◆ digit_split_strategy()

void tools::detail::digit_split_strategy ( const std::vector< cryptonote::tx_destination_entry > & dsts,
const cryptonote::tx_destination_entry & change_dst,
uint64_t dust_threshold,
std::vector< cryptonote::tx_destination_entry > & splitted_dsts,
std::vector< cryptonote::tx_destination_entry > & dust_dsts )
inline

Definition at line 2098 of file wallet2.h.

2101 {
2102 splitted_dsts.clear();
2103 dust_dsts.clear();
2104
2105 for(auto& de: dsts)
2106 {
2108 [&](uint64_t chunk) { splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, de.addr, de.is_subaddress)); },
2109 [&](uint64_t a_dust) { splitted_dsts.push_back(cryptonote::tx_destination_entry(a_dust, de.addr, de.is_subaddress)); } );
2110 }
2111
2113 [&](uint64_t chunk) {
2114 if (chunk <= dust_threshold)
2115 dust_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, change_dst.is_subaddress));
2116 else
2117 splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, change_dst.is_subaddress));
2118 },
2119 [&](uint64_t a_dust) { dust_dsts.push_back(cryptonote::tx_destination_entry(a_dust, change_dst.addr, change_dst.is_subaddress)); } );
2120 }
void decompose_amount_into_digits(uint64_t amount, uint64_t dust_threshold, const chunk_handler_t &chunk_handler, const dust_handler_t &dust_handler)
unsigned __int64 uint64_t
Definition stdint.h:136
uint64_t amount
Here is the call graph for this function:
Here is the caller graph for this function:

◆ null_split_strategy()

void tools::detail::null_split_strategy ( const std::vector< cryptonote::tx_destination_entry > & dsts,
const cryptonote::tx_destination_entry & change_dst,
uint64_t dust_threshold,
std::vector< cryptonote::tx_destination_entry > & splitted_dsts,
std::vector< cryptonote::tx_destination_entry > & dust_dsts )
inline

Definition at line 2122 of file wallet2.h.

2125 {
2126 splitted_dsts = dsts;
2127
2128 dust_dsts.clear();
2129 uint64_t change = change_dst.amount;
2130
2131 if (0 != change)
2132 {
2133 splitted_dsts.push_back(cryptonote::tx_destination_entry(change, change_dst.addr, false));
2134 }
2135 }
account_public_address addr

◆ print_source_entry()

void tools::detail::print_source_entry ( const cryptonote::tx_source_entry & src)
inline

Definition at line 2137 of file wallet2.h.

2138 {
2139 std::string indexes;
2140 std::for_each(src.outputs.begin(), src.outputs.end(), [&](const cryptonote::tx_source_entry::output_entry& s_e) { indexes += boost::to_string(s_e.first) + " "; });
2141 LOG_PRINT_L0("amount=" << cryptonote::print_etn(src.amount) << ", real_output=" <<src.real_output << ", real_output_in_tx_index=" << src.real_output_in_tx_index << ", indexes: " << indexes);
2142 }
#define LOG_PRINT_L0(x)
Definition misc_log_ex.h:99
std::string print_etn(uint64_t amount, unsigned int decimal_point)
uint64_t amount
size_t real_output
std::vector< output_entry > outputs
std::pair< uint64_t, rct::ctkey > output_entry
size_t real_output_in_tx_index
Here is the call graph for this function:
Here is the caller graph for this function: