mirror of
https://github.com/monero-project/monero.git
synced 2024-10-01 11:49:47 -04:00
wallet2: fix a couple unused variable warnings
This commit is contained in:
parent
67e5ca9ad6
commit
f63f7dc7e2
@ -7868,7 +7868,6 @@ void wallet2::light_wallet_get_outs(std::vector<std::vector<tools::wallet2::get_
|
|||||||
m_daemon_rpc_mutex.unlock();
|
m_daemon_rpc_mutex.unlock();
|
||||||
THROW_WALLET_EXCEPTION_IF(!r, error::no_connection_to_daemon, "get_random_outs");
|
THROW_WALLET_EXCEPTION_IF(!r, error::no_connection_to_daemon, "get_random_outs");
|
||||||
THROW_WALLET_EXCEPTION_IF(ores.amount_outs.empty() , error::wallet_internal_error, "No outputs received from light wallet node. Error: " + ores.Error);
|
THROW_WALLET_EXCEPTION_IF(ores.amount_outs.empty() , error::wallet_internal_error, "No outputs received from light wallet node. Error: " + ores.Error);
|
||||||
size_t n_outs = 0; for (const auto &e: ores.amount_outs) n_outs += e.outputs.size();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if we got enough outputs for each amount
|
// Check if we got enough outputs for each amount
|
||||||
@ -9671,7 +9670,7 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||||||
std::vector<std::pair<uint32_t, std::vector<size_t>>> unused_transfers_indices_per_subaddr;
|
std::vector<std::pair<uint32_t, std::vector<size_t>>> unused_transfers_indices_per_subaddr;
|
||||||
std::vector<std::pair<uint32_t, std::vector<size_t>>> unused_dust_indices_per_subaddr;
|
std::vector<std::pair<uint32_t, std::vector<size_t>>> unused_dust_indices_per_subaddr;
|
||||||
uint64_t needed_money;
|
uint64_t needed_money;
|
||||||
uint64_t accumulated_fee, accumulated_outputs, accumulated_change;
|
uint64_t accumulated_fee, accumulated_change;
|
||||||
struct TX {
|
struct TX {
|
||||||
std::vector<size_t> selected_transfers;
|
std::vector<size_t> selected_transfers;
|
||||||
std::vector<cryptonote::tx_destination_entry> dsts;
|
std::vector<cryptonote::tx_destination_entry> dsts;
|
||||||
@ -9862,7 +9861,6 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||||||
// start with an empty tx
|
// start with an empty tx
|
||||||
txes.push_back(TX());
|
txes.push_back(TX());
|
||||||
accumulated_fee = 0;
|
accumulated_fee = 0;
|
||||||
accumulated_outputs = 0;
|
|
||||||
accumulated_change = 0;
|
accumulated_change = 0;
|
||||||
adding_fee = false;
|
adding_fee = false;
|
||||||
needed_fee = 0;
|
needed_fee = 0;
|
||||||
@ -9875,8 +9873,6 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||||||
// the destination, and one for change.
|
// the destination, and one for change.
|
||||||
LOG_PRINT_L2("checking preferred");
|
LOG_PRINT_L2("checking preferred");
|
||||||
std::vector<size_t> preferred_inputs;
|
std::vector<size_t> preferred_inputs;
|
||||||
uint64_t rct_outs_needed = 2 * (fake_outs_count + 1);
|
|
||||||
rct_outs_needed += 100; // some fudge factor since we don't know how many are locked
|
|
||||||
if (use_rct)
|
if (use_rct)
|
||||||
{
|
{
|
||||||
// this is used to build a tx that's 1 or 2 inputs, and 2 outputs, which
|
// this is used to build a tx that's 1 or 2 inputs, and 2 outputs, which
|
||||||
@ -9981,7 +9977,6 @@ std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryp
|
|||||||
// add this output to the list to spend
|
// add this output to the list to spend
|
||||||
tx.selected_transfers.push_back(idx);
|
tx.selected_transfers.push_back(idx);
|
||||||
uint64_t available_amount = td.amount();
|
uint64_t available_amount = td.amount();
|
||||||
accumulated_outputs += available_amount;
|
|
||||||
|
|
||||||
// clear any fake outs we'd already gathered, since we'll need a new set
|
// clear any fake outs we'd already gathered, since we'll need a new set
|
||||||
outs.clear();
|
outs.clear();
|
||||||
|
Loading…
Reference in New Issue
Block a user