diff options
author | Zsolt Felfoldi <zsfelfoldi@gmail.com> | 2016-10-19 19:04:55 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-11-09 09:12:53 +0800 |
commit | 49da42983af7a775695166689e5bf701bcec4f81 (patch) | |
tree | 2c325a4852695697cc9616a3eac99a432711abdb /p2p/discv5/nodeevent_string.go | |
parent | 7db7109a5b53c339f00e9c05ac826b3dbd1f98e1 (diff) | |
download | dexon-49da42983af7a775695166689e5bf701bcec4f81.tar dexon-49da42983af7a775695166689e5bf701bcec4f81.tar.gz dexon-49da42983af7a775695166689e5bf701bcec4f81.tar.bz2 dexon-49da42983af7a775695166689e5bf701bcec4f81.tar.lz dexon-49da42983af7a775695166689e5bf701bcec4f81.tar.xz dexon-49da42983af7a775695166689e5bf701bcec4f81.tar.zst dexon-49da42983af7a775695166689e5bf701bcec4f81.zip |
p2p/discv5: added new topic discovery package
Diffstat (limited to 'p2p/discv5/nodeevent_string.go')
-rw-r--r-- | p2p/discv5/nodeevent_string.go | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/p2p/discv5/nodeevent_string.go b/p2p/discv5/nodeevent_string.go new file mode 100644 index 000000000..fde9045c5 --- /dev/null +++ b/p2p/discv5/nodeevent_string.go @@ -0,0 +1,27 @@ +// Code generated by "stringer -type nodeEvent"; DO NOT EDIT + +package discv5 + +import "fmt" + +const ( + _nodeEvent_name_0 = "invalidEventpingPacketpongPacketfindnodePacketneighborsPacketfindnodeHashPackettopicRegisterPackettopicQueryPackettopicNodesPacket" + _nodeEvent_name_1 = "pongTimeoutpingTimeoutneighboursTimeout" +) + +var ( + _nodeEvent_index_0 = [...]uint8{0, 12, 22, 32, 46, 61, 79, 98, 114, 130} + _nodeEvent_index_1 = [...]uint8{0, 11, 22, 39} +) + +func (i nodeEvent) String() string { + switch { + case 0 <= i && i <= 8: + return _nodeEvent_name_0[_nodeEvent_index_0[i]:_nodeEvent_index_0[i+1]] + case 265 <= i && i <= 267: + i -= 265 + return _nodeEvent_name_1[_nodeEvent_index_1[i]:_nodeEvent_index_1[i+1]] + default: + return fmt.Sprintf("nodeEvent(%d)", i) + } +} |