PIVX Core  5.6.99
P2P Digital Currency
Public Member Functions | Private Member Functions | Private Attributes | List of all members
llmq::CRecoveredSigsDb Class Reference

#include <quorums_signing.h>

Collaboration diagram for llmq::CRecoveredSigsDb:
[legend]

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
 
RecursiveMutex 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 57 of file quorums_signing.h.

Constructor & Destructor Documentation

◆ CRecoveredSigsDb()

llmq::CRecoveredSigsDb::CRecoveredSigsDb ( CDBWrapper _db)
explicit
Todo:
this can be completely removed after some time (when we're pretty sure the conversion has been run on most testnet MNs)

Definition at line 27 of file quorums_signing.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ AddVoteTimeKeys()

void llmq::CRecoveredSigsDb::AddVoteTimeKeys ( )

Definition at line 78 of file quorums_signing.cpp.

Here is the caller graph for this function:

◆ CleanupOldRecoveredSigs()

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

Definition at line 308 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ CleanupOldVotes()

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

Definition at line 386 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ ConvertInvalidTimeKeys()

void llmq::CRecoveredSigsDb::ConvertInvalidTimeKeys ( )

Definition at line 43 of file quorums_signing.cpp.

Here is the caller graph for this function:

◆ GetRecoveredSigByHash()

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

Definition at line 194 of file quorums_signing.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetRecoveredSigById()

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

Definition at line 205 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ GetVoteForId()

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

Definition at line 368 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ HasRecoveredSig()

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

Definition at line 115 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ HasRecoveredSigForHash()

bool llmq::CRecoveredSigsDb::HasRecoveredSigForHash ( const uint256 hash)

Definition at line 159 of file quorums_signing.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasRecoveredSigForId()

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

Definition at line 121 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ HasRecoveredSigForSession()

bool llmq::CRecoveredSigsDb::HasRecoveredSigForSession ( const uint256 signHash)

Definition at line 141 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ HasVotedOnId()

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

Definition at line 362 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ ReadRecoveredSig()

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

Definition at line 177 of file quorums_signing.cpp.

Here is the caller graph for this function:

◆ RemoveRecoveredSig() [1/2]

void llmq::CRecoveredSigsDb::RemoveRecoveredSig ( CDBBatch batch,
Consensus::LLMQType  llmqType,
const uint256 id,
bool  deleteHashKey,
bool  deleteTimeKey 
)
private
Todo:
remove the size() == sizeof(uint32_t) in a future version (when we stop supporting upgrades from < 0.14.1)

Definition at line 249 of file quorums_signing.cpp.

Here is the call graph for this function:

◆ RemoveRecoveredSig() [2/2]

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

Definition at line 290 of file quorums_signing.cpp.

◆ TruncateRecoveredSig()

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

Definition at line 300 of file quorums_signing.cpp.

◆ WriteRecoveredSig()

void llmq::CRecoveredSigsDb::WriteRecoveredSig ( const CRecoveredSig recSig)

Definition at line 210 of file quorums_signing.cpp.

◆ WriteVoteForId()

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

Definition at line 374 of file quorums_signing.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ cs

RecursiveMutex llmq::CRecoveredSigsDb::cs
private

Definition at line 62 of file quorums_signing.h.

◆ db

CDBWrapper& llmq::CRecoveredSigsDb::db
private

Definition at line 60 of file quorums_signing.h.

◆ hasSigForHashCache

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

Definition at line 65 of file quorums_signing.h.

◆ hasSigForIdCache

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

Definition at line 63 of file quorums_signing.h.

◆ hasSigForSessionCache

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

Definition at line 64 of file quorums_signing.h.


The documentation for this class was generated from the following files: