1
0
Fork 0
forked from lthn/blockchain

fixed bug with timestamps on strange wallets(reported by sir Gygabyted)

This commit is contained in:
cryptozoidberg 2022-08-01 20:17:38 +02:00
parent 0f126ffd95
commit 2e6d05636d
No known key found for this signature in database
GPG key ID: 22DEB97A54C6FDEC
2 changed files with 3 additions and 5 deletions

View file

@ -829,15 +829,13 @@ bool simple_wallet::list_recent_transfers(const std::vector<std::string>& 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;

View file

@ -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<uint64_t>* 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())