Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/chainlock/chainlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ chainlock::ChainLockSig CChainLocksHandler::GetBestChainLock() const
return bestChainLock;
}

void CChainLocksHandler::UpdateTxFirstSeenMap(const std::unordered_set<uint256, StaticSaltedHasher>& tx, const int64_t& time)
void CChainLocksHandler::UpdateTxFirstSeenMap(const Uint256HashSet& tx, const int64_t& time)
{
AssertLockNotHeld(cs);
LOCK(cs);
Expand Down
5 changes: 2 additions & 3 deletions src/chainlock/chainlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CChainLocksHandler final : public chainlock::ChainLockSignerParent
const CBlockIndex* bestChainLockBlockIndex GUARDED_BY(cs){nullptr};
const CBlockIndex* lastNotifyChainLockBlockIndex GUARDED_BY(cs){nullptr};

std::unordered_map<uint256, std::chrono::seconds, StaticSaltedHasher> txFirstSeenTime GUARDED_BY(cs);
Uint256HashMap<std::chrono::seconds> txFirstSeenTime GUARDED_BY(cs);

std::map<uint256, std::chrono::seconds> seenChainLocks GUARDED_BY(cs);

Expand Down Expand Up @@ -87,8 +87,7 @@ class CChainLocksHandler final : public chainlock::ChainLockSignerParent
EXCLUSIVE_LOCKS_REQUIRED(!cs);
chainlock::ChainLockSig GetBestChainLock() const
EXCLUSIVE_LOCKS_REQUIRED(!cs);
void UpdateTxFirstSeenMap(const std::unordered_set<uint256, StaticSaltedHasher>& tx, const int64_t& time) override
EXCLUSIVE_LOCKS_REQUIRED(!cs);
void UpdateTxFirstSeenMap(const Uint256HashSet& tx, const int64_t& time) override EXCLUSIVE_LOCKS_REQUIRED(!cs);

[[nodiscard]] MessageProcessingResult ProcessNewChainLock(NodeId from, const chainlock::ChainLockSig& clsig,
const uint256& hash) override
Expand Down
8 changes: 4 additions & 4 deletions src/chainlock/signing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void ChainLockSigner::UpdateBlockHashTxidMap(const uint256& hash, const std::vec
if (it == blockTxs.end()) {
// We must create this entry even if there are no lockable transactions in the block, so that TrySignChainTip
// later knows about this block
it = blockTxs.emplace(hash, std::make_shared<std::unordered_set<uint256, StaticSaltedHasher>>()).first;
it = blockTxs.emplace(hash, std::make_shared<Uint256HashSet>()).first;
}
auto& txids = *it->second;
for (const auto& tx : vtx) {
Expand Down Expand Up @@ -200,7 +200,7 @@ ChainLockSigner::BlockTxs::mapped_type ChainLockSigner::GetBlockTxs(const uint25
return nullptr;
}

ret = std::make_shared<std::unordered_set<uint256, StaticSaltedHasher>>();
ret = std::make_shared<Uint256HashSet>();
for (const auto& tx : block.vtx) {
if (tx->IsCoinBase() || tx->vin.empty()) {
continue;
Expand Down Expand Up @@ -243,10 +243,10 @@ MessageProcessingResult ChainLockSigner::HandleNewRecoveredSig(const llmq::CReco
return m_clhandler.ProcessNewChainLock(-1, clsig, ::SerializeHash(clsig));
}

std::vector<std::shared_ptr<std::unordered_set<uint256, StaticSaltedHasher>>> ChainLockSigner::Cleanup()
std::vector<std::shared_ptr<Uint256HashSet>> ChainLockSigner::Cleanup()
{
AssertLockNotHeld(cs_signer);
std::vector<std::shared_ptr<std::unordered_set<uint256, StaticSaltedHasher>>> removed;
std::vector<std::shared_ptr<Uint256HashSet>> removed;
LOCK2(::cs_main, cs_signer);
for (auto it = blockTxs.begin(); it != blockTxs.end();) {
const auto* pindex = m_chainstate.m_blockman.LookupBlockIndex(it->first);
Expand Down
7 changes: 3 additions & 4 deletions src/chainlock/signing.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChainLockSignerParent
virtual bool IsEnabled() const = 0;
virtual bool IsTxSafeForMining(const uint256& txid) const = 0;
[[nodiscard]] virtual MessageProcessingResult ProcessNewChainLock(NodeId from, const ChainLockSig& clsig, const uint256& hash) = 0;
virtual void UpdateTxFirstSeenMap(const std::unordered_set<uint256, StaticSaltedHasher>& tx, const int64_t& time) = 0;
virtual void UpdateTxFirstSeenMap(const Uint256HashSet& tx, const int64_t& time) = 0;
};

class ChainLockSigner final : public llmq::CRecoveredSigsListener
Expand All @@ -52,7 +52,7 @@ class ChainLockSigner final : public llmq::CRecoveredSigsListener
struct BlockHasher {
size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
};
using BlockTxs = std::unordered_map<uint256, std::shared_ptr<std::unordered_set<uint256, StaticSaltedHasher>>, BlockHasher>;
using BlockTxs = std::unordered_map<uint256, std::shared_ptr<Uint256HashSet>, BlockHasher>;

private:
mutable Mutex cs_signer;
Expand Down Expand Up @@ -80,8 +80,7 @@ class ChainLockSigner final : public llmq::CRecoveredSigsListener
[[nodiscard]] MessageProcessingResult HandleNewRecoveredSig(const llmq::CRecoveredSig& recoveredSig) override
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);

[[nodiscard]] std::vector<std::shared_ptr<std::unordered_set<uint256, StaticSaltedHasher>>> Cleanup()
EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);
[[nodiscard]] std::vector<std::shared_ptr<Uint256HashSet>> Cleanup() EXCLUSIVE_LOCKS_REQUIRED(!cs_signer);

private:
[[nodiscard]] BlockTxs::mapped_type GetBlockTxs(const uint256& blockHash)
Expand Down
3 changes: 1 addition & 2 deletions src/evo/cbtx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ auto CachedGetQcHashesQcIndexedHashes(const CBlockIndex* pindexPrev, const llmq:

static Mutex cs_cache;
static std::map<Consensus::LLMQType, std::vector<const CBlockIndex*>> quorums_cached GUARDED_BY(cs_cache);
static std::map<Consensus::LLMQType, unordered_lru_cache<uint256, std::pair<uint256, int>, StaticSaltedHasher>> qc_hashes_cached
GUARDED_BY(cs_cache);
static std::map<Consensus::LLMQType, Uint256LruHashMap<std::pair<uint256, int>>> qc_hashes_cached GUARDED_BY(cs_cache);
static QcHashMap qcHashes_cached GUARDED_BY(cs_cache);
static QcIndexedHashMap qcIndexedHashes_cached GUARDED_BY(cs_cache);

Expand Down
4 changes: 2 additions & 2 deletions src/evo/creditpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ static std::optional<CreditPoolDataPerBlock> GetCreditDataFromBlock(const gsl::n
CreditPoolDataPerBlock blockData;

static Mutex cache_mutex;
static unordered_lru_cache<uint256, CreditPoolDataPerBlock, StaticSaltedHasher> block_data_cache GUARDED_BY(
cache_mutex){static_cast<size_t>(Params().CreditPoolPeriodBlocks()) * 2};
static Uint256LruHashMap<CreditPoolDataPerBlock> block_data_cache GUARDED_BY(cache_mutex){
static_cast<size_t>(Params().CreditPoolPeriodBlocks()) * 2};
if (LOCK(cache_mutex); block_data_cache.get(block_index->GetBlockHash(), blockData)) {
return blockData;
}
Expand Down
2 changes: 1 addition & 1 deletion src/evo/creditpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class CCreditPoolManager
private:
static constexpr size_t CreditPoolCacheSize = 1000;
Mutex cache_mutex;
unordered_lru_cache<uint256, CCreditPool, StaticSaltedHasher> creditPoolCache GUARDED_BY(cache_mutex) {CreditPoolCacheSize};
Uint256LruHashMap<CCreditPool> creditPoolCache GUARDED_BY(cache_mutex){CreditPoolCacheSize};

CEvoDB& evoDb;

Expand Down
4 changes: 2 additions & 2 deletions src/evo/deterministicmns.h
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,8 @@ class CDeterministicMNManager

CEvoDB& m_evoDb;

std::unordered_map<uint256, CDeterministicMNList, StaticSaltedHasher> mnListsCache GUARDED_BY(cs);
std::unordered_map<uint256, CDeterministicMNListDiff, StaticSaltedHasher> mnListDiffsCache GUARDED_BY(cs);
Uint256HashMap<CDeterministicMNList> mnListsCache GUARDED_BY(cs);
Uint256HashMap<CDeterministicMNListDiff> mnListDiffsCache GUARDED_BY(cs);
const CBlockIndex* tipIndex GUARDED_BY(cs) {nullptr};
const CBlockIndex* m_initial_snapshot_index GUARDED_BY(cs) {nullptr};

Expand Down
2 changes: 1 addition & 1 deletion src/evo/mnhftx.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class CMNHFManager : public AbstractEHFManager
static constexpr size_t MNHFCacheSize = 1000;
Mutex cs_cache;
// versionBit <-> height
unordered_lru_cache<uint256, Signals, StaticSaltedHasher> mnhfCache GUARDED_BY(cs_cache) {MNHFCacheSize};
Uint256LruHashMap<Signals> mnhfCache GUARDED_BY(cs_cache){MNHFCacheSize};

Comment on lines +100 to 101
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Fix merge conflict and validate constructor call

  • CI flags a conflict in this header; resolve it.
  • Brace‑init with MNHFCacheSize is correct for unordered_lru_cache; no further changes needed.
🧰 Tools
🪛 GitHub Actions: Check Potential Conflicts

[error] Merge conflict in 'src/evo/mnhftx.h' file.

🤖 Prompt for AI Agents
In src/evo/mnhftx.h around lines 100 to 101, resolve the leftover merge conflict
markers so the declaration reads as a single clean line, ensuring the
Uint256LruHashMap<Signals> mnhfCache GUARDED_BY(cs_cache){MNHFCacheSize};
remains intact; confirm the brace-init with MNHFCacheSize is preserved (it is
the correct constructor for unordered_lru_cache) and remove any conflict
artifacts or duplicated declarations so the header compiles cleanly.

public:
explicit CMNHFManager(CEvoDB& evoDb);
Expand Down
6 changes: 3 additions & 3 deletions src/instantsend/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void CInstantSendDb::WriteInstantSendLockArchived(CDBBatch& batch, const uint256
batch.Write(std::make_tuple(DB_ARCHIVED_BY_HASH, hash), true);
}

std::unordered_map<uint256, InstantSendLockPtr, StaticSaltedHasher> CInstantSendDb::RemoveConfirmedInstantSendLocks(int nUntilHeight)
Uint256HashMap<InstantSendLockPtr> CInstantSendDb::RemoveConfirmedInstantSendLocks(int nUntilHeight)
{
LOCK(cs_db);
if (nUntilHeight <= best_confirmed_height) {
Expand All @@ -133,7 +133,7 @@ std::unordered_map<uint256, InstantSendLockPtr, StaticSaltedHasher> CInstantSend
it->Seek(firstKey);

CDBBatch batch(*db);
std::unordered_map<uint256, InstantSendLockPtr, StaticSaltedHasher> ret;
Uint256HashMap<InstantSendLockPtr> ret;
while (it->Valid()) {
decltype(firstKey) curKey;
if (!it->GetKey(curKey) || std::get<0>(curKey) != DB_MINED_BY_HEIGHT_AND_HASH) {
Expand Down Expand Up @@ -359,7 +359,7 @@ std::vector<uint256> CInstantSendDb::RemoveChainedInstantSendLocks(const uint256
std::vector<uint256> result;

std::vector<uint256> stack;
std::unordered_set<uint256, StaticSaltedHasher> added;
Uint256HashSet added;
stack.emplace_back(txid);

CDBBatch batch(*db);
Expand Down
6 changes: 3 additions & 3 deletions src/instantsend/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class CInstantSendDb
int best_confirmed_height GUARDED_BY(cs_db){0};

std::unique_ptr<CDBWrapper> db GUARDED_BY(cs_db){nullptr};
mutable unordered_lru_cache<uint256, InstantSendLockPtr, StaticSaltedHasher, 10000> islockCache GUARDED_BY(cs_db);
mutable unordered_lru_cache<uint256, uint256, StaticSaltedHasher, 10000> txidCache GUARDED_BY(cs_db);
mutable Uint256LruHashMap<InstantSendLockPtr, 10000> islockCache GUARDED_BY(cs_db);
mutable Uint256LruHashMap<uint256, 10000> txidCache GUARDED_BY(cs_db);

mutable unordered_lru_cache<COutPoint, uint256, SaltedOutpointHasher, 10000> outpointCache GUARDED_BY(cs_db);
void WriteInstantSendLockMined(CDBBatch& batch, const uint256& hash, int nHeight) EXCLUSIVE_LOCKS_REQUIRED(cs_db);
Expand Down Expand Up @@ -101,7 +101,7 @@ class CInstantSendDb
* @param nUntilHeight Removes all IS Locks confirmed up until nUntilHeight
* @return returns an unordered_map of the hash of the IS Locks and a pointer object to the IS Locks for all IS Locks which were removed
*/
std::unordered_map<uint256, InstantSendLockPtr, StaticSaltedHasher> RemoveConfirmedInstantSendLocks(int nUntilHeight) EXCLUSIVE_LOCKS_REQUIRED(!cs_db);
Uint256HashMap<InstantSendLockPtr> RemoveConfirmedInstantSendLocks(int nUntilHeight) EXCLUSIVE_LOCKS_REQUIRED(!cs_db);
/**
* Removes IS Locks from the archive if the tx was confirmed 100 blocks before nUntilHeight
* @param nUntilHeight the height from which to base the remove of archive IS Locks
Expand Down
16 changes: 8 additions & 8 deletions src/instantsend/instantsend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ namespace llmq {
namespace {
template <typename T>
requires std::same_as<T, CTxIn> || std::same_as<T, COutPoint>
std::unordered_set<uint256, StaticSaltedHasher> GetIdsFromLockable(const std::vector<T>& vec)
Uint256HashSet GetIdsFromLockable(const std::vector<T>& vec)
{
std::unordered_set<uint256, StaticSaltedHasher> ret{};
Uint256HashSet ret{};
if (vec.empty()) return ret;
ret.reserve(vec.size());
for (const auto& in : vec) {
Expand Down Expand Up @@ -230,13 +230,13 @@ instantsend::PendingState CInstantSendManager::ProcessPendingInstantSendLocks()
return ret;
}

std::unordered_set<uint256, StaticSaltedHasher> CInstantSendManager::ProcessPendingInstantSendLocks(
Uint256HashSet CInstantSendManager::ProcessPendingInstantSendLocks(
const Consensus::LLMQParams& llmq_params, int signOffset, bool ban,
const std::unordered_map<uint256, std::pair<NodeId, instantsend::InstantSendLockPtr>, StaticSaltedHasher>& pend,
const Uint256HashMap<std::pair<NodeId, instantsend::InstantSendLockPtr>>& pend,
std::vector<std::pair<NodeId, MessageProcessingResult>>& peer_activity)
{
CBLSBatchVerifier<NodeId, uint256> batchVerifier(false, true, 8);
std::unordered_map<uint256, CRecoveredSig, StaticSaltedHasher> recSigs;
Uint256HashMap<CRecoveredSig> recSigs;

size_t verifyCount = 0;
size_t alreadyVerified = 0;
Expand Down Expand Up @@ -302,7 +302,7 @@ std::unordered_set<uint256, StaticSaltedHasher> CInstantSendManager::ProcessPend
LogPrint(BCLog::INSTANTSEND, "CInstantSendManager::%s -- verified locks. count=%d, alreadyVerified=%d, vt=%d, nodes=%d\n", __func__,
verifyCount, alreadyVerified, verifyTimer.count(), batchVerifier.GetUniqueSourceCount());

std::unordered_set<uint256, StaticSaltedHasher> badISLocks;
Uint256HashSet badISLocks;

if (ban && !batchVerifier.badSources.empty()) {
LOCK(::cs_main);
Expand Down Expand Up @@ -689,7 +689,7 @@ void CInstantSendManager::HandleFullyConfirmedBlock(const CBlockIndex* pindex)

void CInstantSendManager::RemoveMempoolConflictsForLock(const uint256& hash, const instantsend::InstantSendLock& islock)
{
std::unordered_map<uint256, CTransactionRef, StaticSaltedHasher> toDelete;
Uint256HashMap<CTransactionRef> toDelete;

{
LOCK(mempool.cs);
Expand Down Expand Up @@ -720,7 +720,7 @@ void CInstantSendManager::RemoveMempoolConflictsForLock(const uint256& hash, con
void CInstantSendManager::ResolveBlockConflicts(const uint256& islockHash, const instantsend::InstantSendLock& islock)
{
// Lets first collect all non-locked TXs which conflict with the given ISLOCK
std::unordered_map<const CBlockIndex*, std::unordered_map<uint256, CTransactionRef, StaticSaltedHasher>> conflicts;
std::unordered_map<const CBlockIndex*, Uint256HashMap<CTransactionRef>> conflicts;
{
LOCK(cs_nonLocked);
for (const auto& in : islock.inputs) {
Expand Down
19 changes: 9 additions & 10 deletions src/instantsend/instantsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,27 +66,27 @@ class CInstantSendManager final : public instantsend::InstantSendSignerParent

mutable Mutex cs_pendingLocks;
// Incoming and not verified yet
std::unordered_map<uint256, std::pair<NodeId, instantsend::InstantSendLockPtr>, StaticSaltedHasher> pendingInstantSendLocks GUARDED_BY(cs_pendingLocks);
Uint256HashMap<std::pair<NodeId, instantsend::InstantSendLockPtr>> pendingInstantSendLocks GUARDED_BY(cs_pendingLocks);
// Tried to verify but there is no tx yet
std::unordered_map<uint256, std::pair<NodeId, instantsend::InstantSendLockPtr>, StaticSaltedHasher> pendingNoTxInstantSendLocks GUARDED_BY(cs_pendingLocks);
Uint256HashMap<std::pair<NodeId, instantsend::InstantSendLockPtr>> pendingNoTxInstantSendLocks GUARDED_BY(cs_pendingLocks);

// TXs which are neither IS locked nor ChainLocked. We use this to determine for which TXs we need to retry IS
// locking of child TXs
struct NonLockedTxInfo {
const CBlockIndex* pindexMined;
CTransactionRef tx;
std::unordered_set<uint256, StaticSaltedHasher> children;
Uint256HashSet children;
};

mutable Mutex cs_nonLocked;
std::unordered_map<uint256, NonLockedTxInfo, StaticSaltedHasher> nonLockedTxs GUARDED_BY(cs_nonLocked);
Uint256HashMap<NonLockedTxInfo> nonLockedTxs GUARDED_BY(cs_nonLocked);
std::unordered_map<COutPoint, uint256, SaltedOutpointHasher> nonLockedTxsByOutpoints GUARDED_BY(cs_nonLocked);

mutable Mutex cs_pendingRetry;
std::unordered_set<uint256, StaticSaltedHasher> pendingRetryTxs GUARDED_BY(cs_pendingRetry);
Uint256HashSet pendingRetryTxs GUARDED_BY(cs_pendingRetry);

mutable Mutex cs_timingsTxSeen;
std::unordered_map<uint256, int64_t, StaticSaltedHasher> timingsTxSeen GUARDED_BY(cs_timingsTxSeen);
Uint256HashMap<int64_t> timingsTxSeen GUARDED_BY(cs_timingsTxSeen);

public:
explicit CInstantSendManager(CChainLocksHandler& _clhandler, CChainState& chainstate, CQuorumManager& _qman,
Expand All @@ -110,10 +110,9 @@ class CInstantSendManager final : public instantsend::InstantSendSignerParent
instantsend::PendingState ProcessPendingInstantSendLocks()
EXCLUSIVE_LOCKS_REQUIRED(!cs_nonLocked, !cs_pendingLocks, !cs_pendingRetry);

std::unordered_set<uint256, StaticSaltedHasher> ProcessPendingInstantSendLocks(
const Consensus::LLMQParams& llmq_params, int signOffset, bool ban,
const std::unordered_map<uint256, std::pair<NodeId, instantsend::InstantSendLockPtr>, StaticSaltedHasher>& pend,
std::vector<std::pair<NodeId, MessageProcessingResult>>& peer_activity)
Uint256HashSet ProcessPendingInstantSendLocks(const Consensus::LLMQParams& llmq_params, int signOffset, bool ban,
const Uint256HashMap<std::pair<NodeId, instantsend::InstantSendLockPtr>>& pend,
std::vector<std::pair<NodeId, MessageProcessingResult>>& peer_activity)
EXCLUSIVE_LOCKS_REQUIRED(!cs_nonLocked, !cs_pendingLocks, !cs_pendingRetry);
MessageProcessingResult ProcessInstantSendLock(NodeId from, const uint256& hash,
const instantsend::InstantSendLockPtr& islock)
Expand Down
2 changes: 1 addition & 1 deletion src/instantsend/signing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void InstantSendSigner::Stop()
m_sigman.UnregisterRecoveredSigsListener(this);
}

void InstantSendSigner::ClearInputsFromQueue(const std::unordered_set<uint256, StaticSaltedHasher>& ids)
void InstantSendSigner::ClearInputsFromQueue(const Uint256HashSet& ids)
{
LOCK(cs_input_requests);
for (const auto& id : ids) {
Expand Down
9 changes: 4 additions & 5 deletions src/instantsend/signing.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ class InstantSendSigner final : public llmq::CRecoveredSigsListener
* Request ids of inputs that we signed. Used to determine if a recovered signature belongs to an
* in-progress input lock.
*/
std::unordered_set<uint256, StaticSaltedHasher> inputRequestIds GUARDED_BY(cs_input_requests);
Uint256HashSet inputRequestIds GUARDED_BY(cs_input_requests);

/**
* These are the islocks that are currently in the middle of being created. Entries are created when we observed
* recovered signatures for all inputs of a TX. At the same time, we initiate signing of our sigshare for the
* islock. When the recovered sig for the islock later arrives, we can finish the islock and propagate it.
*/
std::unordered_map<uint256, InstantSendLock, StaticSaltedHasher> creatingInstantSendLocks GUARDED_BY(cs_creating);
Uint256HashMap<InstantSendLock> creatingInstantSendLocks GUARDED_BY(cs_creating);
// maps from txid to the in-progress islock
std::unordered_map<uint256, InstantSendLock*, StaticSaltedHasher> txToCreatingInstantSendLocks GUARDED_BY(cs_creating);
Uint256HashMap<InstantSendLock*> txToCreatingInstantSendLocks GUARDED_BY(cs_creating);

public:
explicit InstantSendSigner(CChainState& chainstate, llmq::CChainLocksHandler& clhandler,
Expand All @@ -78,8 +78,7 @@ class InstantSendSigner final : public llmq::CRecoveredSigsListener
void Start();
void Stop();

void ClearInputsFromQueue(const std::unordered_set<uint256, StaticSaltedHasher>& ids)
EXCLUSIVE_LOCKS_REQUIRED(!cs_input_requests);
void ClearInputsFromQueue(const Uint256HashSet& ids) EXCLUSIVE_LOCKS_REQUIRED(!cs_input_requests);

void ClearLockFromQueue(const InstantSendLockPtr& islock)
EXCLUSIVE_LOCKS_REQUIRED(!cs_creating);
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/blockprocessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CQuorumBlockProcessor
std::map<std::pair<Consensus::LLMQType, uint256>, uint256> minableCommitmentsByQuorum GUARDED_BY(minableCommitmentsCs);
std::map<uint256, CFinalCommitment> minableCommitments GUARDED_BY(minableCommitmentsCs);

mutable std::map<Consensus::LLMQType, unordered_lru_cache<uint256, bool, StaticSaltedHasher>> mapHasMinedCommitmentCache GUARDED_BY(minableCommitmentsCs);
mutable std::map<Consensus::LLMQType, Uint256LruHashMap<bool>> mapHasMinedCommitmentCache GUARDED_BY(minableCommitmentsCs);

public:
explicit CQuorumBlockProcessor(CChainState& chainstate, CDeterministicMNManager& dmnman, CEvoDB& evoDb,
Expand Down
2 changes: 1 addition & 1 deletion src/llmq/dkgsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ void CDKGSession::VerifyConnectionAndMinProtoVersions(CConnman& connman) const

CDKGLogger logger(*this, __func__, __LINE__);

std::unordered_map<uint256, int, StaticSaltedHasher> protoMap;
Uint256HashMap<int> protoMap;
connman.ForEachNode([&](const CNode* pnode) {
auto verifiedProRegTxHash = pnode->GetVerifiedProRegTxHash();
if (verifiedProRegTxHash.IsNull()) {
Expand Down
Loading
Loading