From 2e6d05636d9180d8904fef7633289ba24e5322b1 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Mon, 1 Aug 2022 20:17:38 +0200 Subject: [PATCH] fixed bug with timestamps on strange wallets(reported by sir Gygabyted) --- src/simplewallet/simplewallet.cpp | 6 ++---- src/wallet/wallet2.cpp | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index edba3b07..d2571d62 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -829,15 +829,13 @@ bool simple_wallet::list_recent_transfers(const std::vector& args) success_msg_writer() << "Unconfirmed transfers: "; for (auto & wti : unconfirmed) { - if (!wti.fee) - wti.fee = currency::get_tx_fee(wti.tx); + wti.fee = currency::get_tx_fee(wti.tx); print_wti(wti); } success_msg_writer() << "Recent transfers: "; for (auto & wti : recent) { - if (!wti.fee) - wti.fee = currency::get_tx_fee(wti.tx); + wti.fee = currency::get_tx_fee(wti.tx); print_wti(wti); } return true; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index ff23bd5d..24476f13 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1469,7 +1469,7 @@ void wallet2::process_new_blockchain_entry(const currency::block& b, const curre //optimization: seeking only for blocks that are not older then the wallet creation time plus 1 day. 1 day is for possible user incorrect time setup const std::vector* pglobal_index = nullptr; - if (b.timestamp + 60 * 60 * 24 > m_account.get_createtime()) + if (get_block_height(b) > get_wallet_minimum_height()) // b.timestamp + 60 * 60 * 24 > m_account.get_createtime()) { pglobal_index = nullptr; if (bche.coinbase_ptr.get())