Skip to content

Commit

Permalink
net: Add and document network messages in protocol.h
Browse files Browse the repository at this point in the history
- 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.
  • Loading branch information
laanwj committed Dec 10, 2015
1 parent 5dc63ed commit 9bbe71b
Show file tree
Hide file tree
Showing 5 changed files with 283 additions and 73 deletions.
2 changes: 1 addition & 1 deletion src/alert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ bool CAlert::RelayTo(CNode* pnode) const
AppliesToMe() ||
GetAdjustedTime() < nRelayUntil)
{
pnode->PushMessage("alert", *this);
pnode->PushMessage(NetMsgType::ALERT, *this);
return true;
}
}
Expand Down
Loading

0 comments on commit 9bbe71b

Please sign in to comment.