aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorJaquee <jaquee.monero@gmail.com>2017-08-04 23:15:10 +0200
committerJaquee <jaquee.monero@gmail.com>2017-10-15 17:51:20 +0200
commit7a482f302b1ba2d8f9ff2afae4d46233c452d666 (patch)
treeaf0dc2b53693d2db65680e01b52d640afa18b1ac /src/wallet/wallet2.cpp
parentwallet2: get_outs lightwallet support (diff)
downloadmonero-7a482f302b1ba2d8f9ff2afae4d46233c452d666.tar.xz
wallet2: create_transactions_2 lightwallet support
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 3b17c9bc9..c387375ad 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -4542,6 +4542,9 @@ void wallet2::transfer_selected_rct(std::vector<cryptonote::tx_destination_entry
src.rct = td.is_rct();
//paste mixin transaction
+ THROW_WALLET_EXCEPTION_IF(outs.size() < out_index + 1 , error::wallet_internal_error, "outs.size() < out_index + 1");
+ THROW_WALLET_EXCEPTION_IF(outs[out_index].size() < fake_outputs_count , error::wallet_internal_error, "fake_outputs_count > random outputs found");
+
typedef cryptonote::tx_source_entry::output_entry tx_output_entry;
for (size_t n = 0; n < fake_outputs_count + 1; ++n)
{
@@ -5268,6 +5271,10 @@ bool wallet2::light_wallet_key_image_is_ours(const crypto::key_image& key_image,
// usable balance.
std::vector<wallet2::pending_tx> wallet2::create_transactions_2(std::vector<cryptonote::tx_destination_entry> dsts, const size_t fake_outs_count, const uint64_t unlock_time, uint32_t priority, const std::vector<uint8_t>& extra, uint32_t subaddr_account, std::set<uint32_t> subaddr_indices, bool trusted_daemon)
{
+ if(m_light_wallet) {
+ // Populate m_transfers
+ light_wallet_get_unspent_outs();
+ }
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;
uint64_t needed_money;