Skip to content

Commit

Permalink
Allow MSG_FILTERED_BLOCK and MSG_FILTERED_WITNESS_BLOCK in getdata.
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeShark committed Jan 14, 2016
1 parent caf4b5f commit 7429425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ const char* CInv::GetCommand() const
int masked = type & MSG_TYPE_MASK;
switch (masked)
{
case MSG_TX: return NetMsgType::TX;
case MSG_BLOCK: return NetMsgType::BLOCK;
case MSG_TX: return NetMsgType::TX;
case MSG_BLOCK: return NetMsgType::BLOCK;
case MSG_FILTERED_BLOCK: return NetMsgType::MERKLEBLOCK;
default:
throw std::out_of_range(strprintf("CInv::GetCommand(): type=%d unknown type", type));
}
Expand Down
2 changes: 1 addition & 1 deletion src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ enum GetDataMsg
{
MSG_TX = 1,
MSG_BLOCK,
MSG_TYPE_MAX = MSG_BLOCK,
// The following can only occur in getdata. Invs always use TX or BLOCK.
MSG_FILTERED_BLOCK,
MSG_TYPE_MAX = MSG_FILTERED_BLOCK,
UNDEFINED,
};

Expand Down

0 comments on commit 7429425

Please sign in to comment.