mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
P2P docs
This commit is contained in:
+3
-7
@@ -4,9 +4,7 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
/*
|
||||
IPeerSet has a (immutable) subset of the methods of PeerSet.
|
||||
*/
|
||||
// IPeerSet has a (immutable) subset of the methods of PeerSet.
|
||||
type IPeerSet interface {
|
||||
Has(key string) bool
|
||||
List() []*Peer
|
||||
@@ -15,10 +13,8 @@ type IPeerSet interface {
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/*
|
||||
PeerSet is a special structure for keeping a table of peers.
|
||||
Iteration over the peers is super fast and thread-safe.
|
||||
*/
|
||||
// PeerSet is a special structure for keeping a table of peers.
|
||||
// Iteration over the peers is super fast and thread-safe.
|
||||
type PeerSet struct {
|
||||
mtx sync.Mutex
|
||||
lookup map[string]*peerSetItem
|
||||
|
||||
Reference in New Issue
Block a user