From 0f4184cd70509000437613a532bc2bfc233fb623 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Wed, 26 Jun 2024 11:48:57 +0000 Subject: [PATCH] refactor: drop usage of chainstate globals in spork logic --- src/spork.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/spork.cpp b/src/spork.cpp index 798dddac77..3d489bc76f 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -149,8 +149,7 @@ PeerMsgRet CSporkManager::ProcessSpork(const CNode& peer, PeerManager& peerman, { LOCK(cs_main); EraseObjectRequest(peer.GetId(), CInv(MSG_SPORK, hash)); - if (!::ChainActive().Tip()) return {}; - strLogMsg = strprintf("SPORK -- hash: %s id: %d value: %10d bestHeight: %d peer=%d", hash.ToString(), spork.nSporkID, spork.nValue, ::ChainActive().Height(), peer.GetId()); + strLogMsg = strprintf("SPORK -- hash: %s id: %d value: %10d peer=%d", hash.ToString(), spork.nSporkID, spork.nValue, peer.GetId()); } if (spork.nTimeSigned > GetAdjustedTime() + 2 * 60 * 60) {