forked from lthn/blockchain
more logs, more logs, more logs
This commit is contained in:
parent
c5972c006a
commit
218d2735c5
2 changed files with 36 additions and 2 deletions
|
|
@ -5661,6 +5661,9 @@ void wallet2::prepare_tx_destinations(uint64_t needed_money,
|
|||
const std::vector<currency::tx_destination_entry>& dsts,
|
||||
std::vector<currency::tx_destination_entry>& final_detinations, const crypto::hash& asset_id)
|
||||
{
|
||||
//&&&&&
|
||||
LOG_PRINT_MAGENTA("[-->prepare_tx_destinations[asset_id="<< asset_id <<"]] needed_money " << needed_money, LOG_LEVEL_0);
|
||||
|
||||
currency::tx_destination_entry change_dts = AUTO_VAL_INIT(change_dts);
|
||||
if (needed_money < found_money)
|
||||
{
|
||||
|
|
@ -5678,11 +5681,28 @@ void wallet2::prepare_tx_destinations(uint64_t needed_money,
|
|||
return;
|
||||
}
|
||||
|
||||
//&&&&&
|
||||
//LOG_PRINT_MAGENTA("[--prepare_tx_destinations[asset_id=" << asset_id << "]] needed_money " << needed_money, LOG_LEVEL_0);
|
||||
|
||||
//&&&&&
|
||||
for (const auto& d : dsts)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("[--prepare_tx_destinations::before split] amount:" << d.amount << ", asset_id:" << d.asset_id, LOG_LEVEL_0);
|
||||
}
|
||||
|
||||
uint64_t dust = 0;
|
||||
bool r = detail::apply_split_strategy_by_id(destination_split_strategy_id, dsts, change_dts, dust_policy.dust_threshold, final_detinations, dust, WALLET_MAX_ALLOWED_OUTPUT_AMOUNT);
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(r, "invalid split strategy id: " << destination_split_strategy_id);
|
||||
WLT_THROW_IF_FALSE_WALLET_INT_ERR_EX(dust_policy.dust_threshold >= dust, "invalid dust value: dust = " << dust << ", dust_threshold = " << dust_policy.dust_threshold);
|
||||
|
||||
//&&&&&
|
||||
for (const auto& d : final_detinations)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("[--prepare_tx_destinations::after split] amount:" << d.amount << ", asset_id:" << d.asset_id, LOG_LEVEL_0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//@#@
|
||||
#ifdef _DEBUG
|
||||
if (final_detinations.size() > 10)
|
||||
|
|
@ -5747,14 +5767,25 @@ void wallet2::prepare_transaction(construct_tx_param& ctp, currency::finalize_tx
|
|||
}
|
||||
TIME_MEASURE_FINISH_MS(prepare_tx_sources_time);
|
||||
|
||||
//&&&&&
|
||||
for (const auto& d : ctp.dsts)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("[pre-prepare_tx_destinations] amount:" << d.amount << ", asset_id:" << d.asset_id, LOG_LEVEL_0);
|
||||
}
|
||||
//&&&&&
|
||||
for (const auto& d : needed_money_map)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("[pre-prepare_tx_destinations] needed_money_map key: " << d.first << ", needed amount: " << d.second.needed_amount, LOG_LEVEL_0);
|
||||
}
|
||||
|
||||
TIME_MEASURE_START_MS(prepare_tx_destinations_time);
|
||||
prepare_tx_destinations(needed_money_map, static_cast<detail::split_strategy_id_t>(ctp.split_strategy_id), ctp.dust_policy, ctp.dsts, ftp.prepared_destinations);
|
||||
TIME_MEASURE_FINISH_MS(prepare_tx_destinations_time);
|
||||
|
||||
//&&&&&
|
||||
for (const auto d : ftp.prepared_destinations)
|
||||
for (const auto& d : ftp.prepared_destinations)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("[prepare_tx_destinations] amount:" << d.amount << ", asset_id:" << d.asset_id, LOG_LEVEL_0);
|
||||
LOG_PRINT_MAGENTA("[post-prepare_tx_destinations] amount:" << d.amount << ", asset_id:" << d.asset_id, LOG_LEVEL_0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -252,6 +252,9 @@ namespace tools
|
|||
const currency::tx_destination_entry& change_dst, uint64_t dust_threshold,
|
||||
std::vector<currency::tx_destination_entry>& splitted_dsts, uint64_t& dust, uint64_t max_output_allowed)
|
||||
{
|
||||
//&&&&&
|
||||
LOG_PRINT_MAGENTA("[--apply_split_strategy_by_id, split strtegy_id: " << id, LOG_LEVEL_0);
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case ssi_digit:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue