mirror of
https://github.com/libp2p/go-libp2p-peerstore.git
synced 2024-12-27 23:40:16 +08:00
cosmetics
This commit is contained in:
parent
3140aaa2c3
commit
d340d2983e
@ -39,8 +39,8 @@ type addrSegment struct {
|
||||
size uint32
|
||||
}
|
||||
|
||||
func (s *addrSegments) get(id peer.ID) *addrSegment {
|
||||
b := []byte(id)
|
||||
func (s *addrSegments) get(p peer.ID) *addrSegment {
|
||||
b := []byte(p)
|
||||
return s[b[len(b)-1]]
|
||||
}
|
||||
|
||||
|
@ -20,8 +20,8 @@ type protoSegment struct {
|
||||
|
||||
type protoSegments [256]*protoSegment
|
||||
|
||||
func (s *protoSegments) get(id peer.ID) *protoSegment {
|
||||
b := []byte(id)
|
||||
func (s *protoSegments) get(p peer.ID) *protoSegment {
|
||||
b := []byte(p)
|
||||
return s[b[len(b)-1]]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user