diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 22:06:42 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 22:10:00 +0800 |
commit | fa53c5e0747925e065ca968c1cca9c974f40dc6b (patch) | |
tree | b75a2f6dfb0d1258d993fe7e4a9874f09d2f911b /eth/downloader/peer.go | |
parent | ebbd8b0743f9639ebf2b23ed04946cc20a83ff6e (diff) | |
download | dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar.gz dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar.bz2 dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar.lz dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar.xz dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.tar.zst dexon-fa53c5e0747925e065ca968c1cca9c974f40dc6b.zip |
eth/downloader: use count instead of peers, clearer
Diffstat (limited to 'eth/downloader/peer.go')
-rw-r--r-- | eth/downloader/peer.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/downloader/peer.go b/eth/downloader/peer.go index 1ff2d5149..4abae8d5e 100644 --- a/eth/downloader/peer.go +++ b/eth/downloader/peer.go @@ -154,8 +154,8 @@ func (ps *peerSet) Peer(id string) *peer { return ps.peers[id] } -// Peers returns if the current number of peers in the set. -func (ps *peerSet) Peers() int { +// Len returns if the current number of peers in the set. +func (ps *peerSet) Len() int { ps.lock.RLock() defer ps.lock.RUnlock() |