This repository was archived by the owner on Oct 28, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +274
-164
lines changed
Expand file tree Collapse file tree 5 files changed +274
-164
lines changed Original file line number Diff line number Diff line change 66- Added: [ #5557 ] ( https://github.com/ethereum/aleth/pull/5557 ) Improved debug logging of full sync.
77- Changed: [ #5559 ] ( https://github.com/ethereum/aleth/pull/5559 ) Update peer validation error messages.
88- Fixed: [ #5562 ] ( https://github.com/ethereum/aleth/pull/5562 ) Don't send header request messages to peers that haven't sent us Status yet.
9+ - Changed: [ #5568 ] ( https://github.com/ethereum/aleth/pull/5568 ) Improve rlpx handshake log messages and create new rlpx log channel.
910
1011## [ 1.6.0] - Unreleased
1112
Original file line number Diff line number Diff line change @@ -15,6 +15,27 @@ using namespace std;
1515const NodeIPEndpoint UnspecifiedNodeIPEndpoint = NodeIPEndpoint{{}, 0 , 0 };
1616const Node UnspecifiedNode = Node{{}, UnspecifiedNodeIPEndpoint};
1717
18+ char const * packetTypeToString (PacketType _packetType)
19+ {
20+ switch (_packetType)
21+ {
22+ case HelloPacket:
23+ return " HelloPacket" ;
24+ case DisconnectPacket:
25+ return " DisconnectPacket" ;
26+ case PingPacket:
27+ return " PingPacket" ;
28+ case PongPacket:
29+ return " PongPacket" ;
30+ case GetPeersPacket:
31+ return " GetPeersPacket" ;
32+ case PeersPacket:
33+ return " PeersPacket" ;
34+ default :
35+ return " UnknownPacket" ;
36+ }
37+ }
38+
1839bool isPublicAddress (string const & _addressToCheck)
1940{
2041 return _addressToCheck.empty () ? false :
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ enum PacketType
8989 UserPacket = 0x10
9090};
9191
92+ char const * packetTypeToString (PacketType _packetType);
93+
9294enum DisconnectReason
9395{
9496 DisconnectRequested = 0 ,
@@ -259,6 +261,11 @@ inline boost::log::formatting_ostream& operator<<(
259261 return _strm;
260262}
261263
264+ inline std::ostream& operator <<(std::ostream& _strm, NodeID const & _id)
265+ {
266+ _strm << " ##" << _id.abridged ();
267+ return _strm;
268+ }
262269
263270// / Simple stream output for a NodeIPEndpoint.
264271std::ostream& operator <<(std::ostream& _out, NodeIPEndpoint const & _ep);
You can’t perform that action at this time.
0 commit comments