From 6c6fb4d0b324e39ce168fd65ce359f3a128d7918 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 14 Aug 2018 09:46:11 +0300 Subject: [PATCH] Remove patch 0031 --- ...031-fix-discovery-loop-when-no-seeds.patch | 24 ------------------- .../ethereum/go-ethereum/p2p/discv5/net.go | 13 +--------- 2 files changed, 1 insertion(+), 36 deletions(-) delete mode 100644 _assets/patches/geth/0031-fix-discovery-loop-when-no-seeds.patch diff --git a/_assets/patches/geth/0031-fix-discovery-loop-when-no-seeds.patch b/_assets/patches/geth/0031-fix-discovery-loop-when-no-seeds.patch deleted file mode 100644 index f132f3f8b..000000000 --- a/_assets/patches/geth/0031-fix-discovery-loop-when-no-seeds.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/p2p/discv5/net.go b/p2p/discv5/net.go -index d0eae28f..25e75d50 100644 ---- a/p2p/discv5/net.go -+++ b/p2p/discv5/net.go -@@ -641,7 +641,18 @@ loop: - }() - } else { - refreshDone = make(chan struct{}) -- net.refresh(refreshDone) -+ -+ done := make(chan struct{}) -+ net.refresh(done) -+ <-done -+ -+ // Refresh again only if there are no seeds. -+ // Also, sleep for some time to prevent from -+ // executing too often. -+ go func() { -+ time.Sleep(time.Millisecond * 100) -+ close(refreshDone) -+ }() - } - } - } diff --git a/vendor/github.com/ethereum/go-ethereum/p2p/discv5/net.go b/vendor/github.com/ethereum/go-ethereum/p2p/discv5/net.go index 79a0da27b..d0eae28f9 100644 --- a/vendor/github.com/ethereum/go-ethereum/p2p/discv5/net.go +++ b/vendor/github.com/ethereum/go-ethereum/p2p/discv5/net.go @@ -641,18 +641,7 @@ loop: }() } else { refreshDone = make(chan struct{}) - - done := make(chan struct{}) - net.refresh(done) - <-done - - // Refresh again only if there are no seeds. - // Also, sleep for some time to prevent from - // executing too often. - go func() { - time.Sleep(time.Millisecond * 100) - close(refreshDone) - }() + net.refresh(refreshDone) } } }