From 1ecc53aec2accc97740a0c5677f211c53962a596 Mon Sep 17 00:00:00 2001 From: woodser Date: Sun, 28 Jul 2019 11:46:27 -0400 Subject: [PATCH] wallet listener is not const --- src/wallet/MoneroWallet.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index 9766db7..31c047e 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -652,7 +652,7 @@ namespace monero { MTRACE("~Wallet2Listener()"); } - void setWalletListener(const boost::optional listener) { + void setWalletListener(boost::optional listener) { this->listener = listener; updateListening(); } @@ -715,9 +715,9 @@ namespace monero { MoneroWallet& wallet; // wallet to provide context for notifications tools::wallet2& wallet2; // internal wallet implementation to listen to boost::optional listener; // target listener to invoke with notifications + boost::optional syncListener; boost::optional syncStartHeight; boost::optional syncEndHeight; - boost::optional syncListener; void updateListening() { wallet2.callback(listener == boost::none && syncListener == boost::none ? nullptr : this); @@ -1059,7 +1059,6 @@ namespace monero { return lockAndSync(); } - // TODO **: listener should be constant MoneroSyncResult MoneroWallet::sync(MoneroSyncListener& listener) { MTRACE("sync(listener)"); if (!isConnected) throw runtime_error("No connection to daemon");