Fix broken height rejection rule

This commit is contained in:
Jason Rhinelander 2019-07-01 12:05:33 -03:00
parent 336fc3e895
commit 2199a3b6f4
1 changed files with 2 additions and 2 deletions

View File

@ -334,10 +334,10 @@ namespace service_nodes
//
{
bool height_in_buffer = false;
if (latest_height > vote.block_height + VERIFY_HEIGHT_BUFFER)
if (latest_height > vote.block_height + VOTE_LIFETIME)
{
height_in_buffer = latest_height <= vote.block_height + (VOTE_LIFETIME + VERIFY_HEIGHT_BUFFER);
LOG_PRINT_L1("Received vote for height: " << vote.block_height << ", is older than: " << VERIFY_HEIGHT_BUFFER
LOG_PRINT_L1("Received vote for height: " << vote.block_height << ", is older than: " << VOTE_LIFETIME
<< " blocks and has been rejected.");
vvc.m_invalid_block_height = true;
}