forked from lthn/blockchain
Merge branch 'release' into develop
This commit is contained in:
commit
9e81e7228c
4 changed files with 3 additions and 8 deletions
|
|
@ -464,8 +464,7 @@ namespace currency
|
|||
{
|
||||
time_pack_txs_ms = epee::misc_utils::get_tick_count();
|
||||
currency_connection_context exclude_context = boost::value_initialized<currency_connection_context>();
|
||||
NOTIFY_NEW_BLOCK::request arg = AUTO_VAL_INIT(arg);
|
||||
arg.hop = 0;
|
||||
NOTIFY_NEW_BLOCK::request arg{};
|
||||
arg.current_blockchain_height = m_blockchain_storage.get_current_blockchain_size();
|
||||
std::list<crypto::hash> missed_txs;
|
||||
std::list<transaction> txs;
|
||||
|
|
|
|||
|
|
@ -58,12 +58,10 @@ namespace currency
|
|||
{
|
||||
block_complete_entry b;
|
||||
uint64_t current_blockchain_height;
|
||||
uint32_t hop;
|
||||
|
||||
BEGIN_KV_SERIALIZE_MAP()
|
||||
KV_SERIALIZE(b)
|
||||
KV_SERIALIZE(current_blockchain_height)
|
||||
KV_SERIALIZE(hop)
|
||||
END_KV_SERIALIZE_MAP()
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ namespace currency
|
|||
}
|
||||
|
||||
crypto::hash block_id = get_block_hash(b);
|
||||
LOG_PRINT_GREEN("[HANDLE]NOTIFY_NEW_BLOCK " << block_id << " HEIGHT " << get_block_height(b) << " (hop " << arg.hop << ")", LOG_LEVEL_2);
|
||||
LOG_PRINT_GREEN("[HANDLE]NOTIFY_NEW_BLOCK " << block_id << " HEIGHT " << get_block_height(b), LOG_LEVEL_2);
|
||||
|
||||
CRITICAL_REGION_BEGIN(m_blocks_id_que_lock);
|
||||
auto it = m_blocks_id_que.find(block_id);
|
||||
|
|
@ -329,7 +329,6 @@ namespace currency
|
|||
if (m_core.pre_validate_block(b, bvc, block_id) && bvc.m_added_to_main_chain)
|
||||
{
|
||||
//not alternative block, relay it
|
||||
++arg.hop;
|
||||
relay_block(arg, context);
|
||||
prevalidate_relayed = true;
|
||||
}
|
||||
|
|
@ -377,7 +376,6 @@ namespace currency
|
|||
if (true/*!prevalidate_relayed*/)
|
||||
{
|
||||
// pre-validation failed prevoiusly, but complete check was success, not an alternative block
|
||||
++arg.hop;
|
||||
//TODO: Add here announce protocol usage
|
||||
relay_block(arg, context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
#define PROJECT_REVISION "8"
|
||||
#define PROJECT_VERSION PROJECT_MAJOR_VERSION "." PROJECT_MINOR_VERSION "." PROJECT_REVISION
|
||||
|
||||
#define PROJECT_VERSION_BUILD_NO 417
|
||||
#define PROJECT_VERSION_BUILD_NO 418
|
||||
#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 "]"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue