Skip to content

Commit

Permalink
refactor: drop usage of chainstate globals in spork logic
Browse files Browse the repository at this point in the history
kwvg committed Jun 26, 2024

Verified

This commit was signed with the committer’s verified signature.
kwvg Kittywhiskers Van Gogh
1 parent 208b1c0 commit 0f4184c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/spork.cpp
Original file line number Diff line number Diff line change
@@ -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) {

0 comments on commit 0f4184c

Please sign in to comment.