From 6ea3a8ba44d8f1fe0d97ed21e57501a01c174c9b Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 29 May 2019 16:56:17 -0400 Subject: [PATCH] calling listeners on sync progress --- src/wallet/MoneroWallet.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index a5fcfdd..9e04e81 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -72,7 +72,10 @@ namespace monero { uint64_t numBlocksTotal = *syncEndHeight - *syncStartHeight + 1; double percentDone = numBlocksDone / (double) numBlocksTotal; string message = string("Synchronizing"); - cout << "Ready to notify sync progress(" << *syncStartHeight << ", " << numBlocksDone << ", " << numBlocksTotal << ", " << percentDone << ", " << message << ")" << endl; + + // notify listeners of progress + if (this->listener != nullptr) this->listener->onSyncProgress(*syncStartHeight, numBlocksDone, numBlocksTotal, percentDone, message); + if (this->syncListener != nullptr) this->syncListener->onSyncProgress(*syncStartHeight, numBlocksDone, numBlocksTotal, percentDone, message); } }