From fe3ea090d17ced157bd8fdd047b6b635a1413a76 Mon Sep 17 00:00:00 2001 From: lhofhansl Date: Sun, 26 Feb 2023 14:18:18 -0800 Subject: [PATCH] Don't expire blocks visible to the client. (#13255) --- src/clientiface.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/clientiface.cpp b/src/clientiface.cpp index 23ce7e966..8ae2efada 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -294,12 +294,6 @@ void RemoteClient::GetNextBlocks ( continue; } - /* - Don't send already sent blocks - */ - if (m_blocks_sent.find(p) != m_blocks_sent.end()) - continue; - /* Check if map has this block */ @@ -310,6 +304,12 @@ void RemoteClient::GetNextBlocks ( // Reset usage timer, this block will be of use in the future. block->resetUsageTimer(); + /* + Don't send already sent blocks + */ + if (m_blocks_sent.find(p) != m_blocks_sent.end()) + continue; + // Check whether the block exists (with data) if (!block->isGenerated()) block_not_found = true; -- 2.44.0