diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index 39e296f..536de04 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -1031,22 +1031,22 @@ namespace monero { MoneroSyncResult MoneroWallet::sync() { cout << "sync()" << endl; - return syncAux(boost::none, boost::none, boost::none); + return syncAux(boost::none, boost::none); } MoneroSyncResult MoneroWallet::sync(MoneroSyncListener& listener) { cout << "sync(startHeight)" << endl; - return syncAux(boost::none, boost::none, listener); + return syncAux(boost::none, listener); } MoneroSyncResult MoneroWallet::sync(uint64_t startHeight) { cout << "sync(startHeight)" << endl; - return syncAux(startHeight, boost::none, boost::none); + return syncAux(startHeight, boost::none); } MoneroSyncResult MoneroWallet::sync(uint64_t startHeight, MoneroSyncListener& listener) { cout << "sync(startHeight, listener)" << endl; - return syncAux(startHeight, boost::none, listener); + return syncAux(startHeight, listener); } void MoneroWallet::setAutoSync(bool autoSync) { @@ -2331,19 +2331,16 @@ namespace monero { do { if (getIsDaemonSynced()) { if (rescan) wallet2->rescan_blockchain(false); - syncAux(boost::none, boost::none, boost::none); + syncAux(boost::none, boost::none); if (!isSynced) isSynced = true; wallet2->find_and_save_rings(false); } } while (!rescan && (rescan = rescanOnSync.exchange(false))); // repeat if not rescanned and rescan was requested } - MoneroSyncResult MoneroWallet::syncAux(boost::optional startHeight, boost::optional endHeight, boost::optional listener) { + MoneroSyncResult MoneroWallet::syncAux(boost::optional startHeight, boost::optional listener) { cout << "syncAux()" << endl; - // validate inputs - if (endHeight != boost::none) throw runtime_error("Monero core wallet2 does not support syncing to an end height"); // TODO: remove end height altogether - // determine sync start height uint64_t syncStartHeight = startHeight == boost::none ? max(getHeight(), getRestoreHeight()) : *startHeight; if (syncStartHeight < getRestoreHeight()) setRestoreHeight(syncStartHeight); // TODO monero core: start height processed > requested start height unless restore height manually set diff --git a/src/wallet/MoneroWallet.h b/src/wallet/MoneroWallet.h index 1fd446c..e100121 100644 --- a/src/wallet/MoneroWallet.h +++ b/src/wallet/MoneroWallet.h @@ -1178,6 +1178,6 @@ namespace monero { std::atomic autoSyncThreadDone; // whether or not auto sync loop is done (cannot be re-started) void autoSyncThreadFunc(); // function to run auto sync loop thread void autoSyncAux(); // internal synchronized sync function - MoneroSyncResult syncAux(boost::optional startHeight, boost::optional endHeight, boost::optional listener); + MoneroSyncResult syncAux(boost::optional startHeight, boost::optional listener); }; }