Merge pull request #1567
c9f13c5e
wallet2: fix tx reroll not updating fee is going up a kB step (moneromooo-monero)
This commit is contained in:
commit
31de98793f
@ -4228,13 +4228,19 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOG_PRINT_L2("We made a tx, adjusting fee and saving it");
|
LOG_PRINT_L2("We made a tx, adjusting fee and saving it");
|
||||||
if (use_rct)
|
do {
|
||||||
transfer_selected_rct(tx.dsts, tx.selected_transfers, fake_outs_count, unlock_time, needed_fee, extra,
|
if (use_rct)
|
||||||
test_tx, test_ptx);
|
transfer_selected_rct(tx.dsts, tx.selected_transfers, fake_outs_count, unlock_time, needed_fee, extra,
|
||||||
else
|
test_tx, test_ptx);
|
||||||
transfer_selected(tx.dsts, tx.selected_transfers, fake_outs_count, unlock_time, needed_fee, extra,
|
else
|
||||||
detail::digit_split_strategy, tx_dust_policy(::config::DEFAULT_DUST_THRESHOLD), test_tx, test_ptx);
|
transfer_selected(tx.dsts, tx.selected_transfers, fake_outs_count, unlock_time, needed_fee, extra,
|
||||||
txBlob = t_serializable_object_to_blob(test_ptx.tx);
|
detail::digit_split_strategy, tx_dust_policy(::config::DEFAULT_DUST_THRESHOLD), test_tx, test_ptx);
|
||||||
|
txBlob = t_serializable_object_to_blob(test_ptx.tx);
|
||||||
|
needed_fee = calculate_fee(fee_per_kb, txBlob, fee_multiplier);
|
||||||
|
LOG_PRINT_L2("Made an attempt at a final " << ((txBlob.size() + 1023)/1024) << " kB tx, with " << print_money(test_ptx.fee) <<
|
||||||
|
" fee and " << print_money(test_ptx.change_dts.amount) << " change");
|
||||||
|
} while (needed_fee > test_ptx.fee);
|
||||||
|
|
||||||
LOG_PRINT_L2("Made a final " << ((txBlob.size() + 1023)/1024) << " kB tx, with " << print_money(test_ptx.fee) <<
|
LOG_PRINT_L2("Made a final " << ((txBlob.size() + 1023)/1024) << " kB tx, with " << print_money(test_ptx.fee) <<
|
||||||
" fee and " << print_money(test_ptx.change_dts.amount) << " change");
|
" fee and " << print_money(test_ptx.change_dts.amount) << " change");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user