![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
An alert is a combination of a serialized CUnsignedAlert and a signature. More...
#include <alert.h>
Public Member Functions | |
CAlert () | |
IMPLEMENT_SERIALIZE (READWRITE(vchMsg);READWRITE(vchSig);) void SetNull() | |
bool | IsNull () const |
uint256 | GetHash () const |
bool | IsInEffect () const |
bool | Cancels (const CAlert &alert) const |
bool | AppliesTo (int nVersion, std::string strSubVerIn) const |
bool | AppliesToMe () const |
bool | RelayTo (CNode *pnode) const |
bool | CheckSignature () const |
bool | ProcessAlert (bool fThread=true) |
![]() | |
IMPLEMENT_SERIALIZE (READWRITE(this->nVersion);nVersion=this->nVersion;READWRITE(nRelayUntil);READWRITE(nExpiration);READWRITE(nID);READWRITE(nCancel);READWRITE(setCancel);READWRITE(nMinVer);READWRITE(nMaxVer);READWRITE(setSubVer);READWRITE(nPriority);READWRITE(LIMITED_STRING(strComment, 65536));READWRITE(LIMITED_STRING(strStatusBar, 256));READWRITE(LIMITED_STRING(strReserved, 256));) void SetNull() | |
std::string | ToString () const |
void | print () const |
Static Public Member Functions | |
static CAlert | getAlertByHash (const uint256 &hash) |
Public Attributes | |
std::vector< unsigned char > | vchMsg |
std::vector< unsigned char > | vchSig |
![]() | |
int | nVersion |
int64_t | nRelayUntil |
int64_t | nExpiration |
int | nID |
int | nCancel |
std::set< int > | setCancel |
int | nMinVer |
int | nMaxVer |
std::set< std::string > | setSubVer |
int | nPriority |
std::string | strComment |
std::string | strStatusBar |
std::string | strReserved |
An alert is a combination of a serialized CUnsignedAlert and a signature.
bool CAlert::AppliesTo | ( | int | nVersion, |
std::string | strSubVerIn | ||
) | const |
bool CAlert::AppliesToMe | ( | ) | const |
Definition at line 123 of file alert.cpp.
References CLIENT_NAME, CLIENT_VERSION, FormatSubVersion(), and PROTOCOL_VERSION.
Referenced by GetWarnings().
bool CAlert::Cancels | ( | const CAlert & | alert | ) | const |
Definition at line 108 of file alert.cpp.
References CUnsignedAlert::nID.
Referenced by ProcessAlert().
bool CAlert::CheckSignature | ( | ) | const |
Definition at line 146 of file alert.cpp.
References error(), Hash(), Params(), PROTOCOL_VERSION, SER_NETWORK, and CPubKey::Verify().
Definition at line 158 of file alert.cpp.
References LOCK.
Referenced by ClientModel::updateAlert().
uint256 CAlert::GetHash | ( | ) | const |
bool CAlert::IsInEffect | ( | ) | const |
Definition at line 103 of file alert.cpp.
References GetAdjustedTime().
Referenced by ProcessAlert().
bool CAlert::IsNull | ( | ) | const |
Definition at line 93 of file alert.cpp.
Referenced by ClientModel::updateAlert().
bool CAlert::ProcessAlert | ( | bool | fThread = true | ) |
Definition at line 170 of file alert.cpp.
References Cancels(), CT_DELETED, CT_NEW, GetArg(), IsInEffect(), LOCK, LogPrint(), CUnsignedAlert::nID, CClientUIInterface::NotifyAlertChanged, PAIRTYPE, runCommand(), SanitizeString(), and uiInterface.
bool CAlert::RelayTo | ( | CNode * | pnode | ) | const |
Definition at line 128 of file alert.cpp.
References GetAdjustedTime(), CNode::nVersion, CNode::PushMessage(), CNode::setKnown, and CNode::strSubVer.
Referenced by ProcessMessage().