Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicitly set message type values #982

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions rai/node/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,19 +124,23 @@ struct hash<rai::endpoint>

namespace rai
{
/**
* Message types are serialized to the network and existing values must thus never change as
* types are added, removed and reordered in the enum.
*/
enum class message_type : uint8_t
{
invalid,
not_a_type,
keepalive,
publish,
confirm_req,
confirm_ack,
bulk_pull,
bulk_push,
frontier_req,
bulk_pull_blocks,
node_id_handshake
invalid = 0x0,
not_a_type = 0x1,
keepalive = 0x2,
publish = 0x3,
confirm_req = 0x4,
confirm_ack = 0x5,
bulk_pull = 0x6,
bulk_push = 0x7,
frontier_req = 0x8,
bulk_pull_blocks = 0x9,
node_id_handshake = 0x0a
};
enum class bulk_pull_blocks_mode : uint8_t
{
Expand Down