aboutsummaryrefslogtreecommitdiffstats
path: root/p2p
diff options
context:
space:
mode:
authorEmil <mursalimovemeel@gmail.com>2018-09-15 04:07:13 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-09-15 04:07:13 +0800
commit86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32 (patch)
tree92ee61a4d5a2c750b6abc257f30b040485e29842 /p2p
parent7bb95a9a64c9d26bef4f15fdd9301bb0b5cdb668 (diff)
downloadgo-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.gz
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.bz2
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.lz
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.xz
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.tar.zst
go-tangerine-86a03f97d30c11a5321fa2f0fd37cbc4c7f63a32.zip
all: simplify s[:] to s where s is a slice (#17673)
Diffstat (limited to 'p2p')
-rw-r--r--p2p/discover/table.go2
-rw-r--r--p2p/discv5/table.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 0a554bbeb..a130b5494 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -162,7 +162,7 @@ func (tab *Table) ReadRandomNodes(buf []*Node) (n int) {
var buckets [][]*Node
for _, b := range &tab.buckets {
if len(b.entries) > 0 {
- buckets = append(buckets, b.entries[:])
+ buckets = append(buckets, b.entries)
}
}
if len(buckets) == 0 {
diff --git a/p2p/discv5/table.go b/p2p/discv5/table.go
index c793be508..4f4b2426f 100644
--- a/p2p/discv5/table.go
+++ b/p2p/discv5/table.go
@@ -123,7 +123,7 @@ func (tab *Table) readRandomNodes(buf []*Node) (n int) {
var buckets [][]*Node
for _, b := range &tab.buckets {
if len(b.entries) > 0 {
- buckets = append(buckets, b.entries[:])
+ buckets = append(buckets, b.entries)
}
}
if len(buckets) == 0 {