diff --git a/src/wallet/monero_wallet_full.cpp b/src/wallet/monero_wallet_full.cpp index fde345f..538f513 100644 --- a/src/wallet/monero_wallet_full.cpp +++ b/src/wallet/monero_wallet_full.cpp @@ -877,8 +877,11 @@ namespace monero { void on_spend_txs(const std::vector>& txs) { if (m_wallet.get_listeners().empty()) return; - check_for_changed_balances(); - for (const std::shared_ptr& tx : txs) notify_outputs(tx); + tools::threadpool::waiter waiter(*m_notification_pool); + m_notification_pool->submit(&waiter, [this, txs]() { + check_for_changed_balances(); + for (const std::shared_ptr& tx : txs) notify_outputs(tx); + }); } private: @@ -955,7 +958,7 @@ namespace monero { // notify spent outputs // TODO: this provides one input with outgoing amount like monero-wallet-rpc client, use real inputs instead if (tx->m_outgoing_transfer != boost::none) { std::shared_ptr output = std::make_shared(); - tx->m_inputs.push_back(output); + tx->m_inputs.push_back(output); // TODO: should copy tx and block before modifying output->m_tx = tx; output->m_amount = tx->m_outgoing_transfer.get()->m_amount.get() + tx->m_fee.get(); output->m_account_index = tx->m_outgoing_transfer.get()->m_account_index; diff --git a/src/wallet/monero_wallet_model.cpp b/src/wallet/monero_wallet_model.cpp index 41dacb7..207379d 100644 --- a/src/wallet/monero_wallet_model.cpp +++ b/src/wallet/monero_wallet_model.cpp @@ -232,9 +232,9 @@ namespace monero { } } if (src->m_outgoing_transfer != boost::none) { - std::shared_ptr transferCopy = src->m_outgoing_transfer.get()->copy(src->m_outgoing_transfer.get(), std::make_shared()); - transferCopy->m_tx = tgt; - tgt->m_outgoing_transfer = transferCopy; + std::shared_ptr transfer_copy = src->m_outgoing_transfer.get()->copy(src->m_outgoing_transfer.get(), std::make_shared()); + transfer_copy->m_tx = tgt; + tgt->m_outgoing_transfer = transfer_copy; } tgt->m_note = src->m_note; tgt->m_is_locked = src->m_is_locked;