OSDN Git Service
(root)
/
bytom
/
vapor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Format netsync module code directory (#88)
[bytom/vapor.git]
/
p2p
/
switch.go
diff --git
a/p2p/switch.go
b/p2p/switch.go
index
d70fa75
..
57b16cf
100644
(file)
--- a/
p2p/switch.go
+++ b/
p2p/switch.go
@@
-293,6
+293,10
@@
func (sw *Switch) DialPeerWithAddress(addr *NetAddress) error {
return nil
}
+func (sw *Switch) ID() [32]byte {
+ return sw.nodeInfo.PubKey
+}
+
//IsDialing prevent duplicate dialing
func (sw *Switch) IsDialing(addr *NetAddress) bool {
return sw.dialing.Has(addr.IP.String())