mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-27 01:42:27 +00:00
Merge pull request #9260
8703b8a
wallet2: ensure transfers and sweeps use same fee calc logic rnd2 (j-berman)
This commit is contained in:
commit
b85f320738
1 changed files with 3 additions and 3 deletions
|
@ -11119,8 +11119,8 @@ 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, we need " << print_money(needed_fee) << " and we have " << print_money(test_ptx.fee));
|
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;
|
size_t fee_tries = 0;
|
||||||
for (fee_tries = 0; fee_tries < 10 && needed_fee > test_ptx.fee; ++fee_tries) {
|
do {
|
||||||
tx_dsts = tx.get_adjusted_dsts(needed_fee);
|
tx_dsts = tx.get_adjusted_dsts(needed_fee);
|
||||||
|
|
||||||
if (use_rct)
|
if (use_rct)
|
||||||
|
@ -11133,7 +11133,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);
|
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) <<
|
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");
|
" 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,
|
THROW_WALLET_EXCEPTION_IF(fee_tries == 10, error::wallet_internal_error,
|
||||||
"Too many attempts to raise pending tx fee to level of needed fee");
|
"Too many attempts to raise pending tx fee to level of needed fee");
|
||||||
|
|
Loading…
Reference in a new issue