From 88fde0aebeb554355dabc7fd78bc0cf049726460 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 1 May 2020 09:14:13 -0400 Subject: [PATCH] rename get/set_restore_height to get/set_sync_height --- src/wallet/monero_wallet.h | 10 +++++----- src/wallet/monero_wallet_core.cpp | 10 +++++----- src/wallet/monero_wallet_core.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wallet/monero_wallet.h b/src/wallet/monero_wallet.h index 8dc3b53..f8a1956 100644 --- a/src/wallet/monero_wallet.h +++ b/src/wallet/monero_wallet.h @@ -351,17 +351,17 @@ namespace monero { * * @return the height of the first block that the wallet scans */ - virtual uint64_t get_restore_height() const { - throw runtime_error("get_restore_height() not supported"); + virtual uint64_t get_sync_height() const { + throw runtime_error("get_sync_height() not supported"); } /** * Set the height of the first block that the wallet scans. * - * @param restore_height is the height of the first block that the wallet scans + * @param sync_height is the height of the first block that the wallet scans */ - virtual void set_restore_height(uint64_t restore_height) { - throw runtime_error("set_restore_height() not supported"); + virtual void set_sync_height(uint64_t sync_height) { + throw runtime_error("set_sync_height() not supported"); } /** diff --git a/src/wallet/monero_wallet_core.cpp b/src/wallet/monero_wallet_core.cpp index f7ce02e..481ff9d 100644 --- a/src/wallet/monero_wallet_core.cpp +++ b/src/wallet/monero_wallet_core.cpp @@ -1130,12 +1130,12 @@ namespace monero { return m_w2->get_blockchain_current_height(); } - uint64_t monero_wallet_core::get_restore_height() const { + uint64_t monero_wallet_core::get_sync_height() const { return m_w2->get_refresh_from_block_height(); } - void monero_wallet_core::set_restore_height(uint64_t restore_height) { - m_w2->set_refresh_from_block_height(restore_height); + void monero_wallet_core::set_sync_height(uint64_t sync_height) { + m_w2->set_refresh_from_block_height(sync_height); } uint64_t monero_wallet_core::get_daemon_height() const { @@ -3346,8 +3346,8 @@ namespace monero { MTRACE("sync_aux()"); // determine sync start height - uint64_t sync_start_height = start_height == boost::none ? max(get_height(), get_restore_height()) : *start_height; - if (sync_start_height < get_restore_height()) set_restore_height(sync_start_height); // TODO monero core: start height processed > requested start height unless restore height manually set + uint64_t sync_start_height = start_height == boost::none ? max(get_height(), get_sync_height()) : *start_height; + if (sync_start_height < get_sync_height()) set_sync_height(sync_start_height); // TODO monero core: start height processed > requested start height unless sync height manually set // signal start of sync to registered listeners m_w2_listener->on_sync_start(sync_start_height); diff --git a/src/wallet/monero_wallet_core.h b/src/wallet/monero_wallet_core.h index 179d8fe..39db95d 100644 --- a/src/wallet/monero_wallet_core.h +++ b/src/wallet/monero_wallet_core.h @@ -194,8 +194,8 @@ namespace monero { monero_integrated_address get_integrated_address(const string& standard_address = "", const string& payment_id = "") const; monero_integrated_address decode_integrated_address(const string& integrated_address) const; uint64_t get_height() const; - uint64_t get_restore_height() const; - void set_restore_height(uint64_t restore_height); + uint64_t get_sync_height() const; + void set_sync_height(uint64_t sync_height); uint64_t get_daemon_height() const; uint64_t get_daemon_max_peer_height() const; void add_listener(monero_wallet_listener& listener);