From c1ddd1c4d73bb82c4ff4cbf5f89eeb4a92af563d Mon Sep 17 00:00:00 2001 From: woodser Date: Thu, 30 Mar 2023 16:57:42 -0400 Subject: [PATCH] rename sync height to restore height --- src/wallet/monero_wallet.h | 10 +++++----- src/wallet/monero_wallet_full.cpp | 10 +++++----- src/wallet/monero_wallet_full.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/wallet/monero_wallet.h b/src/wallet/monero_wallet.h index 094c093..7a36cbb 100644 --- a/src/wallet/monero_wallet.h +++ b/src/wallet/monero_wallet.h @@ -358,17 +358,17 @@ namespace monero { * * @return the height of the first block that the wallet scans */ - virtual uint64_t get_sync_height() const { - throw std::runtime_error("get_sync_height() not supported"); + virtual uint64_t get_restore_height() const { + throw std::runtime_error("get_restore_height() not supported"); } /** * Set the height of the first block that the wallet scans. * - * @param sync_height is the height of the first block that the wallet scans + * @param restore_height is the height of the first block that the wallet scans */ - virtual void set_sync_height(uint64_t sync_height) { - throw std::runtime_error("set_sync_height() not supported"); + virtual void set_restore_height(uint64_t restore_height) { + throw std::runtime_error("set_restore_height() not supported"); } /** diff --git a/src/wallet/monero_wallet_full.cpp b/src/wallet/monero_wallet_full.cpp index 8068288..75fd17b 100644 --- a/src/wallet/monero_wallet_full.cpp +++ b/src/wallet/monero_wallet_full.cpp @@ -1454,12 +1454,12 @@ namespace monero { return m_w2->get_blockchain_current_height(); } - uint64_t monero_wallet_full::get_sync_height() const { // TODO: rename to get_sync_from_height() + uint64_t monero_wallet_full::get_restore_height() const { // TODO: rename to get_sync_from_height() return m_w2->get_refresh_from_block_height(); } - void monero_wallet_full::set_sync_height(uint64_t sync_height) { - m_w2->set_refresh_from_block_height(sync_height); + void monero_wallet_full::set_restore_height(uint64_t restore_height) { + m_w2->set_refresh_from_block_height(restore_height); } uint64_t monero_wallet_full::get_daemon_height() const { @@ -3796,8 +3796,8 @@ namespace monero { MTRACE("sync_aux()"); // determine sync start height - uint64_t sync_start_height = start_height == boost::none ? std::max(get_height(), get_sync_height()) : *start_height; - if (sync_start_height < get_sync_height()) set_sync_height(sync_start_height); // TODO monero-project: start height processed > requested start height unless sync height manually set + uint64_t sync_start_height = start_height == boost::none ? std::max(get_height(), get_restore_height()) : *start_height; + if (sync_start_height < get_restore_height()) set_restore_height(sync_start_height); // TODO monero-project: start height processed > requested start height unless sync height manually set // notify listeners of sync start m_w2_listener->on_sync_start(sync_start_height); diff --git a/src/wallet/monero_wallet_full.h b/src/wallet/monero_wallet_full.h index 0217fca..5a50cd7 100644 --- a/src/wallet/monero_wallet_full.h +++ b/src/wallet/monero_wallet_full.h @@ -205,8 +205,8 @@ namespace monero { monero_integrated_address get_integrated_address(const std::string& standard_address = "", const std::string& payment_id = "") const override; monero_integrated_address decode_integrated_address(const std::string& integrated_address) const override; uint64_t get_height() const override; - uint64_t get_sync_height() const override; - void set_sync_height(uint64_t sync_height) override; + uint64_t get_restore_height() const override; + void set_restore_height(uint64_t restore_height) override; uint64_t get_daemon_height() const override; uint64_t get_daemon_max_peer_height() const override; uint64_t get_height_by_date(uint16_t year, uint8_t month, uint8_t day) const override;