Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <quorums_signing.h>
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 | |
CDBWrapper & | db |
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()
|
explicit |
Definition at line 39 of file quorums_signing.cpp.
References AddVoteTimeKeys(), ConvertInvalidTimeKeys(), db, CDBWrapper::Exists(), Params(), CBaseChainParams::TESTNET, and CDBWrapper::Write().
Member Function Documentation
◆ AddVoteTimeKeys()
void llmq::CRecoveredSigsDb::AddVoteTimeKeys | ( | ) |
Definition at line 91 of file quorums_signing.cpp.
References db, GetAdjustedTime(), htobe32(), k2, LogPrintf, CDBWrapper::NewIterator(), CDBBatch::Write(), and CDBWrapper::WriteBatch().
Referenced by CRecoveredSigsDb().
◆ CleanupOldRecoveredSigs()
void llmq::CRecoveredSigsDb::CleanupOldRecoveredSigs | ( | int64_t | maxAge | ) |
Definition at line 321 of file quorums_signing.cpp.
References be32toh(), CDBBatch::Clear(), cs, db, CDBBatch::Erase(), GetAdjustedTime(), BCLog::LLMQ, LOCK, LogPrint, CDBWrapper::NewIterator(), RemoveRecoveredSig(), CDBBatch::SizeEstimate(), and CDBWrapper::WriteBatch().
◆ CleanupOldVotes()
void llmq::CRecoveredSigsDb::CleanupOldVotes | ( | int64_t | maxAge | ) |
Definition at line 399 of file quorums_signing.cpp.
References be32toh(), db, CDBBatch::Erase(), GetAdjustedTime(), BCLog::LLMQ, LogPrint, CDBWrapper::NewIterator(), and CDBWrapper::WriteBatch().
◆ ConvertInvalidTimeKeys()
void llmq::CRecoveredSigsDb::ConvertInvalidTimeKeys | ( | ) |
Definition at line 56 of file quorums_signing.cpp.
References db, CDBBatch::Erase(), htobe32(), LogPrintf, CDBWrapper::NewIterator(), CDBBatch::Write(), and CDBWrapper::WriteBatch().
Referenced by CRecoveredSigsDb().
◆ GetRecoveredSigByHash()
bool llmq::CRecoveredSigsDb::GetRecoveredSigByHash | ( | const uint256 & | hash, |
CRecoveredSig & | ret | ||
) |
Definition at line 207 of file quorums_signing.cpp.
References db, k1, k2, CDBWrapper::Read(), and ReadRecoveredSig().
Referenced by llmq::CSigningManager::GetRecoveredSigForGetData().
◆ 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()
bool llmq::CRecoveredSigsDb::HasRecoveredSigForHash | ( | const uint256 & | hash | ) |
Definition at line 172 of file quorums_signing.cpp.
References cs, db, CDBWrapper::Exists(), unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::get(), hasSigForHashCache, unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::insert(), and LOCK.
Referenced by llmq::CSigningManager::AlreadyHave(), llmq::CSigningManager::CollectPendingRecoveredSigsToVerify(), and llmq::CSigningManager::ProcessMessageRecoveredSig().
◆ HasRecoveredSigForId()
bool llmq::CRecoveredSigsDb::HasRecoveredSigForId | ( | Consensus::LLMQType | llmqType, |
const uint256 & | id | ||
) |
Definition at line 134 of file quorums_signing.cpp.
References cs, db, CDBWrapper::Exists(), unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::get(), hasSigForIdCache, unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::insert(), and LOCK.
◆ HasRecoveredSigForSession()
bool llmq::CRecoveredSigsDb::HasRecoveredSigForSession | ( | const uint256 & | signHash | ) |
Definition at line 154 of file quorums_signing.cpp.
References cs, db, CDBWrapper::Exists(), unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::get(), hasSigForSessionCache, unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::insert(), and LOCK.
◆ 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()
|
private |
Definition at line 190 of file quorums_signing.cpp.
References CLIENT_VERSION, db, CDBWrapper::ReadDataStream(), and SER_DISK.
Referenced by GetRecoveredSigByHash(), GetRecoveredSigById(), and RemoveRecoveredSig().
◆ 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]
|
private |
Definition at line 262 of file quorums_signing.cpp.
References AssertLockHeld(), llmq::CLLMQUtils::BuildSignHash(), CLIENT_VERSION, cs, db, unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::erase(), CDBBatch::Erase(), llmq::CRecoveredSig::GetHash(), hasSigForHashCache, hasSigForIdCache, hasSigForSessionCache, htobe32(), llmq::CRecoveredSig::id, k1, k2, llmq::CRecoveredSig::llmqType, llmq::CRecoveredSig::msgHash, CDBWrapper::ReadDataStream(), ReadRecoveredSig(), SER_DISK, and CDataStream::size().
◆ 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()
void llmq::CRecoveredSigsDb::WriteRecoveredSig | ( | const CRecoveredSig & | recSig | ) |
Definition at line 223 of file quorums_signing.cpp.
References llmq::CLLMQUtils::BuildSignHash(), cs, db, GetAdjustedTime(), llmq::CRecoveredSig::GetHash(), GetTimeMillis(), hasSigForHashCache, hasSigForIdCache, hasSigForSessionCache, htobe32(), llmq::CRecoveredSig::id, unordered_lru_cache< Key, Value, Hasher, MaxSize, TruncateThreshold >::insert(), k1, k2, llmq::CRecoveredSig::llmqType, LOCK, llmq::CRecoveredSig::msgHash, CDBBatch::Write(), and CDBWrapper::WriteBatch().
◆ WriteVoteForId()
void llmq::CRecoveredSigsDb::WriteVoteForId | ( | Consensus::LLMQType | llmqType, |
const uint256 & | id, | ||
const uint256 & | msgHash | ||
) |
Definition at line 387 of file quorums_signing.cpp.
References db, GetAdjustedTime(), htobe32(), k1, k2, CDBBatch::Write(), and CDBWrapper::WriteBatch().
Member Data Documentation
◆ cs
|
private |
Definition at line 69 of file quorums_signing.h.
Referenced by CleanupOldRecoveredSigs(), HasRecoveredSigForHash(), HasRecoveredSigForId(), HasRecoveredSigForSession(), RemoveRecoveredSig(), TruncateRecoveredSig(), and WriteRecoveredSig().
◆ db
|
private |
Definition at line 67 of file quorums_signing.h.
Referenced by AddVoteTimeKeys(), CleanupOldRecoveredSigs(), CleanupOldVotes(), ConvertInvalidTimeKeys(), CRecoveredSigsDb(), GetRecoveredSigByHash(), GetVoteForId(), HasRecoveredSig(), HasRecoveredSigForHash(), HasRecoveredSigForId(), HasRecoveredSigForSession(), HasVotedOnId(), ReadRecoveredSig(), RemoveRecoveredSig(), TruncateRecoveredSig(), WriteRecoveredSig(), and WriteVoteForId().
◆ hasSigForHashCache
|
private |
Definition at line 72 of file quorums_signing.h.
Referenced by HasRecoveredSigForHash(), RemoveRecoveredSig(), and WriteRecoveredSig().
◆ hasSigForIdCache
|
private |
Definition at line 70 of file quorums_signing.h.
Referenced by HasRecoveredSigForId(), RemoveRecoveredSig(), and WriteRecoveredSig().
◆ hasSigForSessionCache
|
private |
Definition at line 71 of file quorums_signing.h.
Referenced by HasRecoveredSigForSession(), RemoveRecoveredSig(), and WriteRecoveredSig().
The documentation for this class was generated from the following files:
- src/llmq/quorums_signing.h
- src/llmq/quorums_signing.cpp