MCPcopy Create free account
hub / github.com/LUX-Core/lux / RelayTo

Method RelayTo

src/alert.cpp:129–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool CAlert::RelayTo(CNode* pnode) const
130{
131 if (!IsInEffect())
132 return false;
133 // don't relay to nodes which haven't sent their version message
134 if (pnode->nVersion == 0)
135 return false;
136 // returns true if wasn't already contained in the set
137 if (pnode->setKnown.insert(GetHash()).second) {
138 if (AppliesTo(pnode->nVersion, pnode->strSubVer) ||
139 AppliesToMe() ||
140 GetAdjustedTime() < nRelayUntil) {
141 pnode->PushMessage("alert", *this);
142 return true;
143 }
144 }
145 return false;
146}
147
148bool CAlert::Sign()
149{

Callers 2

ThreadSendAlertFunction · 0.80
ProcessMessageFunction · 0.80

Calls 3

GetAdjustedTimeFunction · 0.85
PushMessageMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected