mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 11:13:13 +00:00
wallet: fix empty tx in corner case sending nothing
This commit is contained in:
parent
77224bbf48
commit
5f5d7279b6
1 changed files with 6 additions and 0 deletions
|
@ -3279,6 +3279,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
||||||
}
|
}
|
||||||
LOG_PRINT_L2("Starting with " << unused_transfers_indices.size() << " non-dust outputs and " << unused_dust_indices.size() << " dust outputs");
|
LOG_PRINT_L2("Starting with " << unused_transfers_indices.size() << " non-dust outputs and " << unused_dust_indices.size() << " dust outputs");
|
||||||
|
|
||||||
|
if (unused_dust_indices.empty() && unused_transfers_indices.empty())
|
||||||
|
return std::vector<wallet2::pending_tx>();
|
||||||
|
|
||||||
// start with an empty tx
|
// start with an empty tx
|
||||||
txes.push_back(TX());
|
txes.push_back(TX());
|
||||||
accumulated_fee = 0;
|
accumulated_fee = 0;
|
||||||
|
@ -3515,6 +3518,9 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_all(const cryptono
|
||||||
}
|
}
|
||||||
LOG_PRINT_L2("Starting with " << unused_transfers_indices.size() << " non-dust outputs and " << unused_dust_indices.size() << " dust outputs");
|
LOG_PRINT_L2("Starting with " << unused_transfers_indices.size() << " non-dust outputs and " << unused_dust_indices.size() << " dust outputs");
|
||||||
|
|
||||||
|
if (unused_dust_indices.empty() && unused_transfers_indices.empty())
|
||||||
|
return std::vector<wallet2::pending_tx>();
|
||||||
|
|
||||||
// start with an empty tx
|
// start with an empty tx
|
||||||
txes.push_back(TX());
|
txes.push_back(TX());
|
||||||
accumulated_fee = 0;
|
accumulated_fee = 0;
|
||||||
|
|
Loading…
Reference in a new issue