| 127 | } |
| 128 | |
| 129 | bool 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 | |
| 148 | bool CAlert::Sign() |
| 149 | { |
no test coverage detected