diff --git a/libp2p/NodeTable.h b/libp2p/NodeTable.h index 5a5690ddb..c35c9cc36 100644 --- a/libp2p/NodeTable.h +++ b/libp2p/NodeTable.h @@ -276,10 +276,11 @@ inline std::ostream& operator<<(std::ostream& _out, NodeTable const& _nodeTable) return _out; } -struct InvalidDiscoveryPacket: Exception { using Exception::Exception; }; +struct InvalidDiscoveryPacket: Exception { public: using Exception::Exception; }; struct DiscoveryDatagram: public RLPXDatagramFace { +public: /// Constructor used for sending. DiscoveryDatagram(bi::udp::endpoint const& _ep): RLPXDatagramFace(_ep), ts(futureFromEpoch(std::chrono::seconds(60))) {} @@ -308,7 +309,7 @@ struct DiscoveryDatagram: public RLPXDatagramFace * If the pinged node doesn't respond, then it is removed and the new * node is inserted. */ -struct PingNode: DiscoveryDatagram +struct PingNode: public DiscoveryDatagram { using DiscoveryDatagram::DiscoveryDatagram; PingNode(NodeIPEndpoint _src, NodeIPEndpoint _dest): DiscoveryDatagram(_dest), source(_src), destination(_dest) {} @@ -341,7 +342,7 @@ struct PingNode: DiscoveryDatagram /** * Pong packet: Sent in response to ping */ -struct Pong: DiscoveryDatagram +struct Pong: public DiscoveryDatagram { using DiscoveryDatagram::DiscoveryDatagram; Pong(NodeIPEndpoint const& _dest): DiscoveryDatagram((bi::udp::endpoint)_dest), destination(_dest) {} @@ -379,7 +380,7 @@ struct Pong: DiscoveryDatagram * target: NodeID of node. The responding node will send back nodes closest to the target. * */ -struct FindNode: DiscoveryDatagram +struct FindNode: public DiscoveryDatagram { using DiscoveryDatagram::DiscoveryDatagram; FindNode(bi::udp::endpoint _ep, h512 _target): DiscoveryDatagram(_ep), target(_target) {}