Skip to content

Commit 9bbe71b

Browse files
committed
net: Add and document network messages in protocol.h
- Avoids string typos (by making the compiler check) - Makes it easier to grep for handling/generation of a certain message type - Refer directly to documentation by following the symbol in IDE - Move list of valid message types to protocol.cpp: protocol.cpp is a more appropriate place for this, and having the array there makes it easier to keep things consistent.
1 parent 5dc63ed commit 9bbe71b

File tree

5 files changed

+283
-73
lines changed

5 files changed

+283
-73
lines changed

src/alert.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool CAlert::RelayTo(CNode* pnode) const
138138
AppliesToMe() ||
139139
GetAdjustedTime() < nRelayUntil)
140140
{
141-
pnode->PushMessage("alert", *this);
141+
pnode->PushMessage(NetMsgType::ALERT, *this);
142142
return true;
143143
}
144144
}

0 commit comments

Comments
 (0)