From d93e1dffa9c4f39888a4f766687f599855b86e8f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Mon, 9 Dec 2019 12:25:45 +0000 Subject: simplewallet: warn on refresh if refresh-from-block-height seems off --- src/simplewallet/simplewallet.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/simplewallet') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index ea8f6f2f5..0ae9f9a0f 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -5553,6 +5553,14 @@ boost::optional simple_wallet::on_device_passphrase_reque //---------------------------------------------------------------------------------------------------- void simple_wallet::on_refresh_finished(uint64_t start_height, uint64_t fetched_blocks, bool is_init, bool received_money) { + const uint64_t rfbh = m_wallet->get_refresh_from_block_height(); + std::string err; + const uint64_t dh = m_wallet->get_daemon_blockchain_height(err); + if (err.empty() && rfbh > dh) + { + message_writer(console_color_yellow, false) << tr("The wallet's refresh-from-block-height setting is higher than the daemon's height: this may mean your wallet will skip over transactions"); + } + // Key image sync after the first refresh if (!m_wallet->get_account().get_device().has_tx_cold_sign() || m_wallet->get_account().get_device().has_ki_live_refresh()) { return; -- cgit v1.2.3