diff --git a/src/currency_core/currency_config.h b/src/currency_core/currency_config.h index a15af43c..e6a21e0b 100644 --- a/src/currency_core/currency_config.h +++ b/src/currency_core/currency_config.h @@ -250,7 +250,7 @@ #define BC_OFFERS_CURRENCY_MARKET_FILENAME "market.bin" -#define WALLET_FILE_SERIALIZATION_VERSION 166 +#define WALLET_FILE_SERIALIZATION_VERSION 167 #define WALLET_FILE_LAST_SUPPORTED_VERSION 165 #define CURRENT_MEMPOOL_ARCHIVE_VER (CURRENCY_FORMATION_VERSION+31) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index ea38b3ad..3b1144aa 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -577,7 +577,7 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t if (pglobal_indexes->size()) { //@#@ - WLT_LOG_L1("add_to_last_zc_global_indexs: h: " << height << ", b: " << currency::get_block_hash(b) << " , tx: " << currency::get_transaction_hash(tx) << ", last_zc_output_index: " << pglobal_indexes->back()); + WLT_LOG_L2("add_to_last_zc_global_indexs: h: " << height << ", b: " << currency::get_block_hash(b) << " , tx: " << currency::get_transaction_hash(tx) << ", last_zc_output_index: " << pglobal_indexes->back()); add_to_last_zc_global_indexs(ptc.height, pglobal_indexes->back()); } } diff --git a/src/wallet/wallet2.h b/src/wallet/wallet2.h index e220959c..725c2c42 100644 --- a/src/wallet/wallet2.h +++ b/src/wallet/wallet2.h @@ -227,11 +227,14 @@ namespace tools uint64_t last_zc_global_index = 0; a& last_zc_global_index; m_last_zc_global_indexs.push_back(std::make_pair(uint64_t(0), last_zc_global_index)); + return; } - else + a& m_last_zc_global_indexs; + if (ver == 166 && m_last_zc_global_indexs.size()) { - a& m_last_zc_global_indexs; - } + //workaround for m_last_zc_global_indexs holding invalid index for last item + m_last_zc_global_indexs.pop_front(); + } } };