Electroneum
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 2087 of file wallet2.h.

2090  {
2091  splitted_dsts.clear();
2092  dust_dsts.clear();
2093 
2094  for(auto& de: dsts)
2095  {
2097  [&](uint64_t chunk) { splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, de.addr, de.is_subaddress)); },
2098  [&](uint64_t a_dust) { splitted_dsts.push_back(cryptonote::tx_destination_entry(a_dust, de.addr, de.is_subaddress)); } );
2099  }
2100 
2102  [&](uint64_t chunk) {
2103  if (chunk <= dust_threshold)
2104  dust_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, change_dst.is_subaddress));
2105  else
2106  splitted_dsts.push_back(cryptonote::tx_destination_entry(chunk, change_dst.addr, change_dst.is_subaddress));
2107  },
2108  [&](uint64_t a_dust) { dust_dsts.push_back(cryptonote::tx_destination_entry(a_dust, change_dst.addr, change_dst.is_subaddress)); } );
2109  }
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 2111 of file wallet2.h.

2114  {
2115  splitted_dsts = dsts;
2116 
2117  dust_dsts.clear();
2118  uint64_t change = change_dst.amount;
2119 
2120  if (0 != change)
2121  {
2122  splitted_dsts.push_back(cryptonote::tx_destination_entry(change, change_dst.addr, false));
2123  }
2124  }
account_public_address addr

◆ print_source_entry()

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

Definition at line 2126 of file wallet2.h.

2127  {
2128  std::string indexes;
2129  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) + " "; });
2130  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);
2131  }
#define LOG_PRINT_L0(x)
Definition: misc_log_ex.h:99
std::string print_etn(uint64_t amount, unsigned int decimal_point)
::std::string string
Definition: gtest-port.h:1097
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: