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

#include <spork.h>

Collaboration diagram for CSporkManager:
[legend]

Public Member Functions

 CSporkManager ()
 
 SERIALIZE_METHODS (CSporkManager, obj)
 
void Clear ()
 
void LoadSporksFromDB ()
 
bool ProcessSpork (CNode *pfrom, std::string &strCommand, CDataStream &vRecv, int &dosScore)
 
int64_t GetSporkValue (SporkId nSporkID)
 
bool UpdateSpork (SporkId nSporkID, int64_t nValue)
 
void AddOrUpdateSporkMessage (const CSporkMessage &spork, bool flush=false)
 
bool IsSporkActive (SporkId nSporkID)
 
std::string GetSporkNameByID (SporkId id)
 
SporkId GetSporkIDByName (std::string strName)
 
bool SetPrivKey (std::string strPrivKey)
 
std::string ToString () const
 
int ProcessSporkMsg (CDataStream &vRecv)
 
int ProcessSporkMsg (CSporkMessage &spork)
 
void ProcessGetSporks (CNode *pfrom, std::string &strCommand, CDataStream &vRecv)
 

Private Attributes

RecursiveMutex cs
 
std::string strMasterPrivKey
 
std::map< SporkId, CSporkDef * > sporkDefsById
 
std::map< std::string, CSporkDef * > sporkDefsByName
 
std::map< SporkId, CSporkMessagemapSporksActive
 

Detailed Description

Definition at line 70 of file spork.h.

Constructor & Destructor Documentation

◆ CSporkManager()

CSporkManager::CSporkManager ( )

Definition at line 32 of file spork.cpp.

Member Function Documentation

◆ AddOrUpdateSporkMessage()

void CSporkManager::AddOrUpdateSporkMessage ( const CSporkMessage spork,
bool  flush = false 
)

Definition at line 206 of file spork.cpp.

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

◆ Clear()

void CSporkManager::Clear ( )

Definition at line 40 of file spork.cpp.

◆ GetSporkIDByName()

SporkId CSporkManager::GetSporkIDByName ( std::string  strName)

Definition at line 245 of file spork.cpp.

Here is the caller graph for this function:

◆ GetSporkNameByID()

std::string CSporkManager::GetSporkNameByID ( SporkId  id)

Definition at line 255 of file spork.cpp.

Here is the caller graph for this function:

◆ GetSporkValue()

int64_t CSporkManager::GetSporkValue ( SporkId  nSporkID)

Definition at line 226 of file spork.cpp.

Here is the caller graph for this function:

◆ IsSporkActive()

bool CSporkManager::IsSporkActive ( SporkId  nSporkID)

Definition at line 220 of file spork.cpp.

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

◆ LoadSporksFromDB()

void CSporkManager::LoadSporksFromDB ( )
Todo:
: Temporary workaround for v5.0 clients to ensure up-to-date protocol version spork

Definition at line 47 of file spork.cpp.

Here is the call graph for this function:

◆ ProcessGetSporks()

void CSporkManager::ProcessGetSporks ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv 
)

Definition at line 174 of file spork.cpp.

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

◆ ProcessSpork()

bool CSporkManager::ProcessSpork ( CNode pfrom,
std::string &  strCommand,
CDataStream vRecv,
int &  dosScore 
)

Definition at line 89 of file spork.cpp.

Here is the call graph for this function:

◆ ProcessSporkMsg() [1/2]

int CSporkManager::ProcessSporkMsg ( CDataStream vRecv)

Definition at line 101 of file spork.cpp.

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

◆ ProcessSporkMsg() [2/2]

int CSporkManager::ProcessSporkMsg ( CSporkMessage spork)

Definition at line 108 of file spork.cpp.

Here is the call graph for this function:

◆ SERIALIZE_METHODS()

CSporkManager::SERIALIZE_METHODS ( CSporkManager  ,
obj   
)
inline

Definition at line 82 of file spork.h.

◆ SetPrivKey()

bool CSporkManager::SetPrivKey ( std::string  strPrivKey)

Definition at line 265 of file spork.cpp.

Here is the call graph for this function:

◆ ToString()

std::string CSporkManager::ToString ( ) const

Definition at line 290 of file spork.cpp.

◆ UpdateSpork()

bool CSporkManager::UpdateSpork ( SporkId  nSporkID,
int64_t  nValue 
)

Definition at line 193 of file spork.cpp.

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

Member Data Documentation

◆ cs

RecursiveMutex CSporkManager::cs
mutableprivate

Definition at line 73 of file spork.h.

◆ mapSporksActive

std::map<SporkId, CSporkMessage> CSporkManager::mapSporksActive
private

Definition at line 77 of file spork.h.

◆ sporkDefsById

std::map<SporkId, CSporkDef*> CSporkManager::sporkDefsById
private

Definition at line 75 of file spork.h.

◆ sporkDefsByName

std::map<std::string, CSporkDef*> CSporkManager::sporkDefsByName
private

Definition at line 76 of file spork.h.

◆ strMasterPrivKey

std::string CSporkManager::strMasterPrivKey
private

Definition at line 74 of file spork.h.


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