From ff00f0a840413e4014df60437f5dacaf5e4a0972 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 28 Aug 2023 10:06:15 -0400 Subject: [PATCH] manually apply waiter.wait() to fix logged error --- src/wallet/monero_wallet_full.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wallet/monero_wallet_full.cpp b/src/wallet/monero_wallet_full.cpp index 5d2f953..eb3407b 100644 --- a/src/wallet/monero_wallet_full.cpp +++ b/src/wallet/monero_wallet_full.cpp @@ -743,6 +743,7 @@ namespace monero { m_sync_start_height = start_height; m_sync_end_height = m_wallet.get_daemon_height(); }); + waiter.wait(); // TODO: this processes notification on thread, process off thread } void on_sync_end() { @@ -754,6 +755,7 @@ namespace monero { m_sync_end_height = boost::none; }); m_notification_pool->recycle(); + waiter.wait(); } void on_new_block(uint64_t height, const cryptonote::block& cn_block) override { @@ -785,6 +787,7 @@ namespace monero { // notify when txs unlock after wallet is synced if (balances_changed && m_wallet.is_synced()) check_for_changed_unlocked_txs(); }); + waiter.wait(); } void on_unconfirmed_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& cn_tx, uint64_t amount, const cryptonote::subaddress_index& subaddr_index) override { @@ -824,6 +827,7 @@ namespace monero { std::cout << "Error processing unconfirmed output received: " << std::string(e.what()) << std::endl; } }); + waiter.wait(); } void on_money_received(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& cn_tx, uint64_t amount, uint64_t burnt, const cryptonote::subaddress_index& subaddr_index, bool is_change, uint64_t unlock_time) override { @@ -865,6 +869,7 @@ namespace monero { std::cout << "Error processing confirmed output received: " << std::string(e.what()) << std::endl; } }); + waiter.wait(); } void on_money_spent(uint64_t height, const crypto::hash &txid, const cryptonote::transaction& cn_tx_in, uint64_t amount, const cryptonote::transaction& cn_tx_out, const cryptonote::subaddress_index& subaddr_index) override { @@ -906,6 +911,7 @@ namespace monero { std::cout << "Error processing confirmed output spent: " << std::string(e.what()) << std::endl; } }); + waiter.wait(); } void on_spend_tx_hashes(const std::vector& tx_hashes) { @@ -924,6 +930,7 @@ namespace monero { check_for_changed_balances(); for (const std::shared_ptr& tx : txs) notify_outputs(tx); }); + waiter.wait(); } private: