From f4ff304bdeca740ee3bde54e6435144988f8e169 Mon Sep 17 00:00:00 2001 From: cryptozoidberg Date: Thu, 27 Aug 2020 15:10:03 +0200 Subject: [PATCH] simplewallet speed opt + more logs --- src/simplewallet/simplewallet.h | 2 +- src/wallet/wallet2.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h index 051201b0..8fc44fc9 100644 --- a/src/simplewallet/simplewallet.h +++ b/src/simplewallet/simplewallet.h @@ -122,7 +122,7 @@ namespace currency m_blockchain_height = (std::max)(m_blockchain_height, height); } - if (std::chrono::milliseconds(1) < current_time - m_print_time || force) + if (std::chrono::milliseconds(100) < current_time - m_print_time || force) { std::cout << "Height " << height << " of " << m_blockchain_height << '\r'; m_print_time = current_time; diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index f79cd95e..b1eae98f 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1195,7 +1195,7 @@ void wallet2::handle_money_received2(const currency::block& b, const currency::t wallet_public::wallet_transfer_info& wti = m_transfer_history.back(); wti.is_income = true; prepare_wti(wti, get_block_height(b), get_actual_timestamp(b), tx, amount, td); - + WLT_LOG_L1("[MONEY RECEIVED]: " << epee::serialization::store_t_to_json(wti)); rise_on_transfer2(wti); } //---------------------------------------------------------------------------------------------------- @@ -1225,6 +1225,7 @@ void wallet2::handle_money_spent2(const currency::block& b, wti.remote_addresses = recipients; wti.recipients_aliases = recipients_aliases; prepare_wti(wti, get_block_height(b), get_actual_timestamp(b), in_tx, amount, td); + WLT_LOG_L1("[MONEY SPENT]: " << epee::serialization::store_t_to_json(wti)); rise_on_transfer2(wti); } //----------------------------------------------------------------------------------------------------