Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Template base class for fixed-sized opaque blobs. More...

#include <uint256.h>

Public Member Functions

 base_blob ()
 
 base_blob (const std::vector< unsigned char > &vch)
 
bool IsNull () const
 
void SetNull ()
 
int Compare (const base_blob &other) const
 
std::string GetHex () const
 
void SetHex (const char *psz)
 
void SetHex (const std::string &str)
 
std::string ToString () const
 
unsigned char * begin ()
 
unsigned char * end ()
 
const unsigned char * begin () const
 
const unsigned char * end () const
 
unsigned int size () const
 
uint64_t GetUint64 (int pos) const
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 

Protected Attributes

uint8_t data [WIDTH]
 

Static Protected Attributes

static constexpr int WIDTH = BITS / 8
 

Friends

bool operator== (const base_blob &a, const base_blob &b)
 
bool operator!= (const base_blob &a, const base_blob &b)
 
bool operator< (const base_blob &a, const base_blob &b)
 

Detailed Description

template<unsigned int BITS>
class base_blob< BITS >

Template base class for fixed-sized opaque blobs.

Definition at line 20 of file uint256.h.

Constructor & Destructor Documentation

◆ base_blob() [1/2]

template<unsigned int BITS>
base_blob< BITS >::base_blob ( )
inline

Definition at line 26 of file uint256.h.

◆ base_blob() [2/2]

template<unsigned int BITS>
base_blob< BITS >::base_blob ( const std::vector< unsigned char > &  vch)
explicit

Definition at line 14 of file uint256.cpp.

Member Function Documentation

◆ begin() [1/2]

template<unsigned int BITS>
unsigned char* base_blob< BITS >::begin ( )
inline

Definition at line 57 of file uint256.h.

Referenced by CWallet::AbandonTransaction(), CBLSSignature::AggregateSecure(), ArithToUint256(), BIP32Hash(), BOOST_AUTO_TEST_CASE(), CDeterministicMNList::CalculateScores(), CheckInputs(), CBloomFilter::contains(), CRollingBloomFilter::contains(), CExtKey::Decode(), CExtPubKey::Decode(), CBLSIESMultiRecipientBlobs::Decrypt(), CKey::Derive(), CPubKey::Derive(), CExtKey::Encode(), CExtPubKey::Encode(), FastRandomContext::FastRandomContext(), CBlockHeaderAndShortTxIDs::FillShortTxIDSelector(), CNetMessage::GetMessageHash(), HASH_SipHash_0032b(), CBLSIESMultiRecipientBlobs::InitEncrypt(), CBloomFilter::insert(), CRollingBloomFilter::insert(), CBLSId::InternalGetBuf(), CBLSId::InternalSetBuf(), CWallet::IsFullyMixed(), CWallet::MarkConflicted(), CZMQPublishHashBlockNotifier::NotifyBlock(), CZMQPublishHashChainLockNotifier::NotifyChainLock(), CZMQPublishHashGovernanceObjectNotifier::NotifyGovernanceObject(), CZMQPublishHashGovernanceVoteNotifier::NotifyGovernanceVote(), CZMQPublishHashInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendAttempt(), CZMQPublishHashTransactionNotifier::NotifyTransaction(), CZMQPublishHashTransactionLockNotifier::NotifyTransactionLock(), SignatureCacheHasher::operator()(), PeerLogicValidation::ProcessMessages(), CBLSPublicKey::PublicKeyShare(), CConnman::PushMessage(), FastRandomContext::rand256(), FastRandomContext::RandomSeed(), CPubKey::RecoverCompact(), CGovernanceManager::RequestGovernanceObjectVotes(), CBLSSecretKey::SecretKeyShare(), llmq::CDKGSession::SendCommitment(), CExtKey::SetMaster(), CKey::Sign(), CBLSSecretKey::Sign(), CKey::SignCompact(), UintToArith256(), CDeterministicMNState::UpdateConfirmedHash(), CPubKey::Verify(), CBLSSignature::VerifyInsecure(), CKey::VerifyPubKey(), CBLSSignature::VerifySecureAggregated(), and while().

◆ begin() [2/2]

template<unsigned int BITS>
const unsigned char* base_blob< BITS >::begin ( ) const
inline

Definition at line 67 of file uint256.h.

◆ Compare()

template<unsigned int BITS>
int base_blob< BITS >::Compare ( const base_blob< BITS > &  other) const
inline

Definition at line 46 of file uint256.h.

◆ end() [1/2]

template<unsigned int BITS>
unsigned char* base_blob< BITS >::end ( )
inline

◆ end() [2/2]

template<unsigned int BITS>
const unsigned char* base_blob< BITS >::end ( ) const
inline

Definition at line 72 of file uint256.h.

◆ GetHex()

template<unsigned int BITS>
std::string base_blob< BITS >::GetHex ( ) const

◆ GetUint64()

template<unsigned int BITS>
uint64_t base_blob< BITS >::GetUint64 ( int  pos) const
inline

◆ IsNull()

template<unsigned int BITS>
bool base_blob< BITS >::IsNull ( ) const
inline

Definition at line 33 of file uint256.h.

Referenced by CWallet::AddToWallet(), CTxMemPool::addUnchecked(), AppInitMain(), AppInitParameterInteraction(), llmq::CDKGSession::AreWeMember(), llmq::CSigningManager::AsyncSignIfMember(), CCoinsViewDB::BatchWrite(), CWallet::BlockConnected(), CDeterministicMNManager::BuildNewListFromBlock(), BuildSimplifiedMNListDiff(), CheckBlockHeader(), CheckProRegTx(), CheckProUpRegTx(), llmq::CChainLocksHandler::Cleanup(), CChainState::ConnectBlock(), CTxMemPool::existsProviderTxConflict(), CCoinsViewCache::GetBestBlock(), llmq::CRecoveredSig::GetHash(), CBLSLazyWrapper< CBLSSignature >::GetHash(), llmq::CInstantSendDb::GetInstantSendLockByInput(), llmq::CInstantSendDb::GetInstantSendLockByTxid(), llmq::CInstantSendDb::GetInstantSendLockHashByTxid(), llmq::CInstantSendManager::GetInstantSendLockHashByTxid(), CNetMessage::GetMessageHash(), llmq::CQuorumBlockProcessor::GetMinableCommitment(), gettxoutproof(), llmq::CInstantSendManager::HandleNewRecoveredSig(), CMerkleTx::hashUnset(), llmq::CDKGSession::Init(), CWallet::InitPrivateSendSalt(), CChainState::InsertBlockIndex(), llmq::CQuorumBlockProcessor::IsCommitmentRequired(), CConnman::IsMasternodeQuorumNode(), COutPoint::IsNull(), llmq::CFinalCommitment::IsNull(), CSpentIndexValue::IsNull(), CDeterministicMNManager::IsProTxWithCollateral(), CMNAuth::NotifyMasternodeListChanged(), llmq::CInstantSendManager::PreVerifyInstantSendLock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessHeadersMessage(), llmq::CInstantSendManager::ProcessInstantSendLock(), CMNAuth::ProcessMessage(), llmq::CSigSharesManager::ProcessMessage(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), llmq::CInstantSendManager::ProcessNewTransaction(), llmq::CInstantSendManager::ProcessTx(), CMNAuth::PushMNAUTH(), quorum_dkgstatus(), ReadKeyValue(), llmq::CDKGSession::RelayInvToParticipants(), CTxMemPool::removeProTxConflicts(), PeerLogicValidation::SendMessages(), CConnman::ThreadOpenMasternodeConnections(), llmq::CDKGDebugSessionStatus::ToJson(), TxToJSON(), TxToUniv(), llmq::CFinalCommitment::Verify(), llmq::CDKGSession::VerifyConnectionAndMinProtoVersions(), and llmq::CDKGSessionHandler::WaitForNextPhase().

◆ Serialize()

template<unsigned int BITS>
template<typename Stream >
void base_blob< BITS >::Serialize ( Stream &  s) const
inline

◆ SetHex() [1/2]

◆ SetHex() [2/2]

template<unsigned int BITS>
void base_blob< BITS >::SetHex ( const std::string &  str)

Definition at line 56 of file uint256.cpp.

◆ SetNull()

◆ size()

template<unsigned int BITS>
unsigned int base_blob< BITS >::size ( ) const
inline

◆ ToString()

template<unsigned int BITS>
std::string base_blob< BITS >::ToString ( ) const

Definition at line 62 of file uint256.cpp.

Referenced by CChainState::AcceptBlockHeader(), llmq::CChainLocksHandler::AcceptedBlockHeader(), AcceptToMemoryPoolWorker(), CGovernanceManager::AddGovernanceObject(), llmq::CInstantSendManager::AddNonLockedTx(), AddOrphanTx(), llmq::CLLMQUtils::AddQuorumProbeConnections(), CWallet::AddToWallet(), CWallet::AddToWalletIfInvolvingMe(), llmq::CInstantSendManager::AskNodesForLockedTx(), llmq::CSigningManager::AsyncSignIfMember(), BlockTipChanged(), CDeterministicMNManager::BuildNewListFromBlock(), llmq::CQuorumManager::BuildQuorumFromCommitment(), BuildSimplifiedMNListDiff(), llmq::CInstantSendManager::CheckCanLock(), CheckForkWarningConditions(), CGovernanceManager::CheckPostponedObjects(), CGovernanceVote::CheckSignature(), CTransactionBuilder::Commit(), CWallet::ComputeTimeSmart(), CChainState::ConnectBlock(), CChainState::ConnectTip(), TransactionTableModel::data(), CChainState::DisconnectTip(), dumpwallet(), llmq::CLLMQUtils::EnsureQuorumConnections(), entryToJSON(), CTxMemPool::existsProviderTxConflict(), llmq::CChainLocksHandler::GetBlockTxs(), ClientModel::getLastBlockHash(), getmempoolancestors(), getmempooldescendants(), llmq::CQuorumManager::GetQuorum(), GetTransaction(), TransactionRecord::getTxID(), gobject_get(), gobject_submit(), llmq::CInstantSendManager::HandleNewInputLockRecoveredSig(), llmq::CInstantSendManager::HandleNewInstantSendLockRecoveredSig(), PartiallyDownloadedBlock::InitData(), InvalidChainFound(), CGovernanceObject::IsCollateralValid(), LoadChainTip(), LoadExternalBlockFile(), CProRegTx::MakeSignString(), CGovernanceManager::MasternodeRateCheck(), mempoolToJSON(), CZMQPublishRawGovernanceObjectNotifier::NotifyGovernanceObject(), CZMQPublishRawGovernanceVoteNotifier::NotifyGovernanceVote(), CZMQPublishHashInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendAttempt(), CZMQPublishRawInstantSendDoubleSpendNotifier::NotifyInstantSendDoubleSpendAttempt(), CMNAuth::NotifyMasternodeListChanged(), CDeterministicMNList::PoSeDecrease(), CDeterministicMNList::PoSePunish(), llmq::CSigSharesManager::PreVerifyBatchedSigShares(), llmq::CSigningManager::PreVerifyRecoveredSig(), CTxMemPool::PrioritiseTransaction(), CDeterministicMNManager::ProcessBlock(), llmq::CQuorumBlockProcessor::ProcessCommitment(), ProcessHeadersMessage(), llmq::CInstantSendManager::ProcessInstantSendLock(), CGovernanceManager::ProcessMessage(), ProcessMessage(), llmq::CSigSharesManager::ProcessMessageBatchedSigShares(), llmq::CSigSharesManager::ProcessMessageGetSigShares(), llmq::CInstantSendManager::ProcessMessageInstantSendLock(), llmq::CSigningManager::ProcessMessageRecoveredSig(), llmq::CSigSharesManager::ProcessMessageSigSesAnn(), llmq::CSigSharesManager::ProcessMessageSigShare(), llmq::CSigSharesManager::ProcessMessageSigSharesInv(), CSporkManager::ProcessSpork(), CBlockPolicyEstimator::processTransaction(), llmq::CInstantSendManager::ProcessTx(), CGovernanceObject::ProcessVote(), CGovernanceManager::ProcessVote(), protx_info(), llmq::CDKGPendingMessages::PushPendingMessage(), llmq::CDKGSession::ReceiveMessage(), CWalletTx::RelayWalletTransaction(), llmq::CInstantSendManager::RemoveChainLockConflictingLock(), llmq::CInstantSendManager::RemoveMempoolConflictsForLock(), CDeterministicMNList::RemoveMN(), llmq::CInstantSendManager::RemoveNonLockedTx(), CChainState::ReplayBlocks(), CGovernanceManager::RequestGovernanceObject(), llmq::CInstantSendManager::ResolveBlockConflicts(), CChainState::RollforwardBlock(), CWallet::SelectPSInOutPairsByDenominations(), PeerLogicValidation::SendMessages(), CGovernanceVote::Sign(), llmq::CSigSharesManager::Sign(), CGovernanceManager::SyncObjects(), CGovernanceManager::SyncSingleObjVotes(), CCbTx::ToJson(), llmq::CRecoveredSig::ToJson(), CProRegTx::ToJson(), CSimplifiedMNListEntry::ToJson(), llmq::CDKGDebugSessionStatus::ToJson(), llmq::CFinalCommitment::ToJson(), CProUpServTx::ToJson(), CSimplifiedMNListDiff::ToJson(), CProUpRegTx::ToJson(), CProUpRevTx::ToJson(), CDeterministicMN::ToJson(), CCbTx::ToString(), llmq::CChainLockSig::ToString(), COutPoint::ToString(), CSimplifiedMNListEntry::ToString(), llmq::CSigSesAnn::ToString(), CProUpServTx::ToString(), CBlock::ToString(), CProUpRegTx::ToString(), CProUpRevTx::ToString(), CDeterministicMN::ToString(), CBlockIndex::ToString(), CDiskBlockIndex::ToString(), CInv::ToString(), COutput::ToString(), COutPoint::ToStringShort(), llmq::CSigSharesManager::TryRecoverSig(), llmq::CChainLocksHandler::TrySignChainTip(), llmq::CInstantSendManager::TrySignInstantSendLock(), TxInErrorToJSON(), CGovernanceManager::UpdateCachesAndClean(), CDeterministicMNList::UpdateMN(), UpdateTip(), TransactionTablePriv::updateWallet(), CDeterministicMNManager::UpgradeDiff(), CVerifyDB::VerifyDB(), CHashSigner::VerifyHash(), and while().

◆ Unserialize()

Friends And Related Function Documentation

◆ operator!=

template<unsigned int BITS>
bool operator!= ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 49 of file uint256.h.

◆ operator<

template<unsigned int BITS>
bool operator< ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 50 of file uint256.h.

◆ operator==

template<unsigned int BITS>
bool operator== ( const base_blob< BITS > &  a,
const base_blob< BITS > &  b 
)
friend

Definition at line 48 of file uint256.h.

Member Data Documentation

◆ data

◆ WIDTH

template<unsigned int BITS>
constexpr int base_blob< BITS >::WIDTH = BITS / 8
staticprotected

Definition at line 23 of file uint256.h.

Referenced by base_blob< 512 >::end(), and base_blob< 512 >::IsNull().


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