Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

#include <quorums_signing.h>

+ Collaboration diagram for llmq::CRecoveredSigsDb:

Public Member Functions

 CRecoveredSigsDb (CDBWrapper &_db)
 
void ConvertInvalidTimeKeys ()
 
void AddVoteTimeKeys ()
 
bool HasRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id, const uint256 &msgHash)
 
bool HasRecoveredSigForId (Consensus::LLMQType llmqType, const uint256 &id)
 
bool HasRecoveredSigForSession (const uint256 &signHash)
 
bool HasRecoveredSigForHash (const uint256 &hash)
 
bool GetRecoveredSigByHash (const uint256 &hash, CRecoveredSig &ret)
 
bool GetRecoveredSigById (Consensus::LLMQType llmqType, const uint256 &id, CRecoveredSig &ret)
 
void WriteRecoveredSig (const CRecoveredSig &recSig)
 
void RemoveRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id)
 
void TruncateRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id)
 
void CleanupOldRecoveredSigs (int64_t maxAge)
 
bool HasVotedOnId (Consensus::LLMQType llmqType, const uint256 &id)
 
bool GetVoteForId (Consensus::LLMQType llmqType, const uint256 &id, uint256 &msgHashRet)
 
void WriteVoteForId (Consensus::LLMQType llmqType, const uint256 &id, const uint256 &msgHash)
 
void CleanupOldVotes (int64_t maxAge)
 

Private Member Functions

bool ReadRecoveredSig (Consensus::LLMQType llmqType, const uint256 &id, CRecoveredSig &ret)
 
void RemoveRecoveredSig (CDBBatch &batch, Consensus::LLMQType llmqType, const uint256 &id, bool deleteHashKey, bool deleteTimeKey)
 

Private Attributes

CDBWrapperdb
 
CCriticalSection cs
 
unordered_lru_cache< std::pair< Consensus::LLMQType, uint256 >, bool, StaticSaltedHasher, 30000 > hasSigForIdCache
 
unordered_lru_cache< uint256, bool, StaticSaltedHasher, 30000 > hasSigForSessionCache
 
unordered_lru_cache< uint256, bool, StaticSaltedHasher, 30000 > hasSigForHashCache
 

Detailed Description

Definition at line 64 of file quorums_signing.h.

Constructor & Destructor Documentation

◆ CRecoveredSigsDb()

llmq::CRecoveredSigsDb::CRecoveredSigsDb ( CDBWrapper _db)
explicit

Member Function Documentation

◆ AddVoteTimeKeys()

void llmq::CRecoveredSigsDb::AddVoteTimeKeys ( )

◆ CleanupOldRecoveredSigs()

void llmq::CRecoveredSigsDb::CleanupOldRecoveredSigs ( int64_t  maxAge)

◆ CleanupOldVotes()

void llmq::CRecoveredSigsDb::CleanupOldVotes ( int64_t  maxAge)

◆ ConvertInvalidTimeKeys()

void llmq::CRecoveredSigsDb::ConvertInvalidTimeKeys ( )

◆ GetRecoveredSigByHash()

bool llmq::CRecoveredSigsDb::GetRecoveredSigByHash ( const uint256 hash,
CRecoveredSig ret 
)

◆ GetRecoveredSigById()

bool llmq::CRecoveredSigsDb::GetRecoveredSigById ( Consensus::LLMQType  llmqType,
const uint256 id,
CRecoveredSig ret 
)

Definition at line 218 of file quorums_signing.cpp.

References ReadRecoveredSig().

◆ GetVoteForId()

bool llmq::CRecoveredSigsDb::GetVoteForId ( Consensus::LLMQType  llmqType,
const uint256 id,
uint256 msgHashRet 
)

Definition at line 381 of file quorums_signing.cpp.

References db, and CDBWrapper::Read().

◆ HasRecoveredSig()

bool llmq::CRecoveredSigsDb::HasRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id,
const uint256 msgHash 
)

Definition at line 128 of file quorums_signing.cpp.

References db, and CDBWrapper::Exists().

◆ HasRecoveredSigForHash()

◆ HasRecoveredSigForId()

◆ HasRecoveredSigForSession()

◆ HasVotedOnId()

bool llmq::CRecoveredSigsDb::HasVotedOnId ( Consensus::LLMQType  llmqType,
const uint256 id 
)

Definition at line 375 of file quorums_signing.cpp.

References db, and CDBWrapper::Exists().

◆ ReadRecoveredSig()

bool llmq::CRecoveredSigsDb::ReadRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id,
CRecoveredSig ret 
)
private

◆ RemoveRecoveredSig() [1/2]

void llmq::CRecoveredSigsDb::RemoveRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id 
)

Definition at line 303 of file quorums_signing.cpp.

References cs, db, LOCK, and CDBWrapper::WriteBatch().

Referenced by CleanupOldRecoveredSigs(), and TruncateRecoveredSig().

◆ RemoveRecoveredSig() [2/2]

◆ TruncateRecoveredSig()

void llmq::CRecoveredSigsDb::TruncateRecoveredSig ( Consensus::LLMQType  llmqType,
const uint256 id 
)

Definition at line 313 of file quorums_signing.cpp.

References cs, db, LOCK, RemoveRecoveredSig(), and CDBWrapper::WriteBatch().

◆ WriteRecoveredSig()

◆ WriteVoteForId()

void llmq::CRecoveredSigsDb::WriteVoteForId ( Consensus::LLMQType  llmqType,
const uint256 id,
const uint256 msgHash 
)

Member Data Documentation

◆ cs

◆ db

◆ hasSigForHashCache

unordered_lru_cache<uint256, bool, StaticSaltedHasher, 30000> llmq::CRecoveredSigsDb::hasSigForHashCache
private

Definition at line 72 of file quorums_signing.h.

Referenced by HasRecoveredSigForHash(), RemoveRecoveredSig(), and WriteRecoveredSig().

◆ hasSigForIdCache

unordered_lru_cache<std::pair<Consensus::LLMQType, uint256>, bool, StaticSaltedHasher, 30000> llmq::CRecoveredSigsDb::hasSigForIdCache
private

Definition at line 70 of file quorums_signing.h.

Referenced by HasRecoveredSigForId(), RemoveRecoveredSig(), and WriteRecoveredSig().

◆ hasSigForSessionCache

unordered_lru_cache<uint256, bool, StaticSaltedHasher, 30000> llmq::CRecoveredSigsDb::hasSigForSessionCache
private

The documentation for this class was generated from the following files:
Released under the MIT license