p2p: add channel buffers to avoid goroutine leaks in tests (#24929)

This commit is contained in:
Boqin@MetaSecureLabs
2022-09-23 10:51:12 +02:00
committed by GitHub
parent 220bdd3277
commit e6d4aedb8c
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -265,7 +265,7 @@ func TestIteratorEmptyTree(t *testing.T) {
resolver.add(tree1.ToTXT("n"))
// Start the iterator.
node := make(chan *enode.Node)
node := make(chan *enode.Node, 1)
it, err := c.NewIterator(url)
if err != nil {
t.Fatal(err)