1
0
Fork 0
forked from lthn/blockchain

Merge branch 'develop' into release

This commit is contained in:
sowle 2024-05-09 21:20:16 +02:00
commit 348e263ebe
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC
5 changed files with 18 additions and 6 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)

@ -1 +1 @@
Subproject commit a1d86d01aaeb13bb013c8b2539e01967de9b5f04
Subproject commit 6f11b2f9c4d0fa98bc9e8b06f29aba357d9b8b80

View file

@ -8,6 +8,6 @@
#define PROJECT_REVISION "0"
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
#define PROJECT_VERSION_BUILD_NO 309
#define PROJECT_VERSION_BUILD_NO 312
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"

View file

@ -576,6 +576,8 @@ void wallet2::process_new_transaction(const currency::transaction& tx, uint64_t
{
if (pglobal_indexes->size())
{
//@#@
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());
}
}
@ -1891,9 +1893,16 @@ void wallet2::process_new_blockchain_entry(const currency::block& b, const curre
TIME_MEASURE_FINISH(miner_tx_handle_time);
TIME_MEASURE_START(txs_handle_time);
size_t count = 0;
for(const auto& tx_entry: bche.txs_ptr)
{
if (b.tx_hashes.size() < count || currency::get_transaction_hash(tx_entry->tx) != b.tx_hashes[count])
{
LOG_ERROR("Found tx order fail in process_new_blockchain_entry: count=" << count
<< ", b.tx_hashes.size() = " << b.tx_hashes.size() << ", tx real id: " << currency::get_transaction_hash(tx_entry->tx) << ", bl_id: " << bl_id);
}
process_new_transaction(tx_entry->tx, height, b, &(tx_entry->m_global_output_indexes));
count++;
}
TIME_MEASURE_FINISH(txs_handle_time);
WLT_LOG_L3("Processed block: " << bl_id << ", height " << height << ", " << miner_tx_handle_time + txs_handle_time << "(" << miner_tx_handle_time << "/" << txs_handle_time <<")ms");

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