Skip to content

Commit fbe0984

Browse files
committed
Fix spurious tip changed detection
This was broken by #58 resulting in spurious "Tip changed" messages. Worse however is that that this caused m_last_block_time to update too often. When -sv2interval is set to 10 seconds or less, this results in PruneBlockTemplateCache never running.
1 parent d5a011c commit fbe0984

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sv2/template_provider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ void Sv2TemplateProvider::ThreadSv2ClientHandler(size_t client_id)
366366

367367
{
368368
LOCK(m_tp_mutex);
369-
if (new_prev_hash != prev_hash) {
369+
if (new_prev_hash != m_best_prev_hash) {
370370
LogPrintLevel(BCLog::SV2, BCLog::Level::Trace, "Tip changed, client id=%zu\n",
371371
client_id);
372372
future_template = true;

0 commit comments

Comments
 (0)