Fix fake 'network synchronized, begin using' messages

This commit is contained in:
Thomas Winget 2016-08-23 22:52:25 -04:00
parent db909a224c
commit 78035d2b6c
No known key found for this signature in database
GPG key ID: 58131A160789E630
2 changed files with 5 additions and 2 deletions

View file

@ -956,9 +956,12 @@ namespace cryptonote
}
//-----------------------------------------------------------------------------------------------
void core::set_target_blockchain_height(uint64_t target_blockchain_height)
{
if (target_blockchain_height > m_target_blockchain_height)
{
m_target_blockchain_height = target_blockchain_height;
}
}
//-----------------------------------------------------------------------------------------------
uint64_t core::get_target_blockchain_height() const
{

View file

@ -263,7 +263,7 @@ namespace cryptonote
if(context.m_state == cryptonote_connection_context::state_synchronizing)
return true;
if(m_core.have_block(hshd.top_id))
if(m_core.have_block(hshd.top_id) && !(hshd.current_height < m_core.get_target_blockchain_height()))
{
context.m_state = cryptonote_connection_context::state_normal;
if(is_inital)