mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
docs: explain meaning of MessageProcessingResult's members
This commit is contained in:
parent
d0f17788fc
commit
c77216ea80
@ -579,13 +579,32 @@ struct MisbehavingError
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO: replace usages of PeerMsgRet to MessageProcessingResult which is cover this one
|
||||||
using PeerMsgRet = tl::expected<void, MisbehavingError>;
|
using PeerMsgRet = tl::expected<void, MisbehavingError>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This struct is a helper to return values from handlers that are processing
|
||||||
|
* network messages but implemented outside of net_processing.cpp,
|
||||||
|
* for example llmq's messages.
|
||||||
|
*
|
||||||
|
* These handlers do not supposed to know anything about PeerManager to avoid
|
||||||
|
* circular dependencies.
|
||||||
|
*
|
||||||
|
* See `PeerManagerImpl::PostProcessMessage` to see how each type of return code
|
||||||
|
* is processed.
|
||||||
|
*/
|
||||||
struct MessageProcessingResult
|
struct MessageProcessingResult
|
||||||
{
|
{
|
||||||
|
//! @m_error triggers Misbehaving error with score and optional message if not nullopt
|
||||||
std::optional<MisbehavingError> m_error;
|
std::optional<MisbehavingError> m_error;
|
||||||
|
|
||||||
|
//! @m_inventory will relay this inventory to connected peers if not nullopt
|
||||||
std::optional<CInv> m_inventory;
|
std::optional<CInv> m_inventory;
|
||||||
|
|
||||||
|
//! @m_transactions will relay transactions to peers which is ready to accept it (some peers does not accept transactions)
|
||||||
std::vector<uint256> m_transactions;
|
std::vector<uint256> m_transactions;
|
||||||
|
|
||||||
|
//! @m_to_erase triggers EraseObjectRequest from PeerManager for this inventory if not nullopt
|
||||||
std::optional<CInv> m_to_erase;
|
std::optional<CInv> m_to_erase;
|
||||||
|
|
||||||
MessageProcessingResult() = default;
|
MessageProcessingResult() = default;
|
||||||
|
Loading…
Reference in New Issue
Block a user