TARAXA
taraxa::MaliciousPeerException Class Reference

Exception thrown in case peer seems malicious based on data he sent. More...

#include <exceptions.hpp>

Collaboration diagram for taraxa::MaliciousPeerException:

Public Member Functions

 MaliciousPeerException (const std::string &msg, std::optional< dev::p2p::NodeID > peer={})
 
std::optional< dev::p2p::NodeIDgetPeer () const
 
- Public Member Functions inherited from taraxa::PacketProcessingException
 PacketProcessingException (const std::string &msg, dev::p2p::DisconnectReason disconnect_reason)
 
dev::p2p::DisconnectReason getDisconnectReason () const
 

Private Attributes

std::optional< dev::p2p::NodeIDpeer_
 

Detailed Description

Exception thrown in case peer seems malicious based on data he sent.

Constructor & Destructor Documentation

◆ MaliciousPeerException()

taraxa::MaliciousPeerException::MaliciousPeerException ( const std::string &  msg,
std::optional< dev::p2p::NodeID peer = {} 
)
inline

Member Function Documentation

◆ getPeer()

std::optional<dev::p2p::NodeID> taraxa::MaliciousPeerException::getPeer ( ) const
inline
Returns
peer that should be disconnected in case it was set

Member Data Documentation

◆ peer_

std::optional<dev::p2p::NodeID> taraxa::MaliciousPeerException::peer_
private

The documentation for this class was generated from the following file: