diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-14 07:27:40 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-02-14 07:27:40 +0800 |
commit | 3ff6c9bb7951e306cc78231f7703fb21e369608e (patch) | |
tree | b770383a550e571590a842da46622781ba15e9b4 /p2p | |
parent | 49a739c8d647739b3d815966f8854a4e9978df56 (diff) | |
parent | 8464e43eaf7d4841f90c8345d6d0afdf3f90ad49 (diff) | |
download | dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar.gz dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar.bz2 dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar.lz dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar.xz dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.tar.zst dexon-3ff6c9bb7951e306cc78231f7703fb21e369608e.zip |
Merge pull request #309 from fjl/peer-window
Fix Mist Peers Window
Diffstat (limited to 'p2p')
-rw-r--r-- | p2p/protocol.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/p2p/protocol.go b/p2p/protocol.go index fe359fc54..5fa395eda 100644 --- a/p2p/protocol.go +++ b/p2p/protocol.go @@ -1,5 +1,7 @@ package p2p +import "fmt" + // Protocol represents a P2P subprotocol implementation. type Protocol struct { // Name should contain the official protocol name, @@ -37,6 +39,10 @@ func (cap Cap) RlpData() interface{} { return []interface{}{cap.Name, cap.Version} } +func (cap Cap) String() string { + return fmt.Sprintf("%s/%d", cap.Name, cap.Version) +} + type capsByName []Cap func (cs capsByName) Len() int { return len(cs) } |