1
0
Fork 0
forked from lthn/blockchain

attempt to fix file with wrong item in last m_last_zc_global_indexs

This commit is contained in:
cryptozoidberg 2024-05-08 23:43:52 +04:00
parent 7ff0463587
commit 6655a6feaf
No known key found for this signature in database
GPG key ID: 2E10CC61CAC8F36D
3 changed files with 8 additions and 5 deletions

View file

@ -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)

View file

@ -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());
}
}

View file

@ -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();
}
}
};