Merge pull request #9259
427ba77
wallet2: ensure transfers and sweeps use same fee calc logic rnd2 (j-berman)
This commit is contained in:
commit
812535390f
|
@ -10436,8 +10436,8 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||
else
|
||||
{
|
||||
LOG_PRINT_L2("We made a tx, adjusting fee and saving it, we need " << print_money(needed_fee) << " and we have " << print_money(test_ptx.fee));
|
||||
size_t fee_tries;
|
||||
for (fee_tries = 0; fee_tries < 10 && needed_fee > test_ptx.fee; ++fee_tries) {
|
||||
size_t fee_tries = 0;
|
||||
do {
|
||||
tx_dsts = tx.get_adjusted_dsts(needed_fee);
|
||||
|
||||
if (use_rct)
|
||||
|
@ -10450,7 +10450,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||
needed_fee = calculate_fee(use_per_byte_fee, test_ptx.tx, txBlob.size(), base_fee, fee_quantization_mask);
|
||||
LOG_PRINT_L2("Made an attempt at a final " << get_weight_string(test_ptx.tx, txBlob.size()) << " tx, with " << print_money(test_ptx.fee) <<
|
||||
" fee and " << print_money(test_ptx.change_dts.amount) << " change");
|
||||
};
|
||||
} while (needed_fee > test_ptx.fee && ++fee_tries < 10);
|
||||
|
||||
THROW_WALLET_EXCEPTION_IF(fee_tries == 10, error::wallet_internal_error,
|
||||
"Too many attempts to raise pending tx fee to level of needed fee");
|
||||
|
|
Loading…
Reference in New Issue