Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/chainlock/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ ChainlockHandler::ChainlockHandler(chainlock::Chainlocks& chainlocks, Chainstate

ChainlockHandler::~ChainlockHandler()
{
scheduler->stop();
scheduler_thread->join();
Stop();
}

void ChainlockHandler::Start()
Expand All @@ -72,7 +71,13 @@ void ChainlockHandler::Start()
std::chrono::seconds{5});
}

void ChainlockHandler::Stop() { scheduler->stop(); }
void ChainlockHandler::Stop()
{
scheduler->stop();
if (scheduler_thread->joinable()) {
scheduler_thread->join();
}
}

bool ChainlockHandler::AlreadyHave(const CInv& inv) const
{
Expand Down
2 changes: 2 additions & 0 deletions src/llmq/signing_shares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,8 @@ bool CSigSharesManager::CollectPendingSigSharesToVerify(
if (!quorum) {
LogPrintf("%s: ERROR! Unexpected missing quorum with llmqType=%d, quorumHash=%s\n", __func__,
std23::to_underlying(llmqType), sigShare.getQuorumHash().ToString());
retSigShares.clear();
retQuorums.clear();
Comment thread
PastaPastaPasta marked this conversation as resolved.
Resolved
return false;
}
retQuorums.try_emplace(k, quorum);
Expand Down
10 changes: 1 addition & 9 deletions src/llmq/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <validation.h>

#include <algorithm>
#include <atomic>
#include <iterator>
#include <map>
#include <optional>
Expand Down Expand Up @@ -902,14 +901,7 @@ std::unordered_set<size_t> CalcDeterministicWatchConnections(Consensus::LLMQType
gsl::not_null<const CBlockIndex*> pQuorumBaseBlockIndex,
size_t memberCount, size_t connectionCount)
{
static uint256 qwatchConnectionSeed;
static std::atomic<bool> qwatchConnectionSeedGenerated{false};
static RecursiveMutex qwatchConnectionSeedCs;
if (!qwatchConnectionSeedGenerated) {
LOCK(qwatchConnectionSeedCs);
qwatchConnectionSeed = GetRandHash();
qwatchConnectionSeedGenerated = true;
}
static const uint256 qwatchConnectionSeed = GetRandHash();

std::unordered_set<size_t> result;
uint256 rnd = qwatchConnectionSeed;
Expand Down
Loading