aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/udp_test.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-08-07 06:10:26 +0800
committerFelix Lange <fjl@twurst.com>2015-08-11 17:42:17 +0800
commit01ed3fa1a9414328eb6c4fc839e1b2044a786a7a (patch)
treef081f6c63b7e5ca04c4976d85654797a4c7f2a0b /p2p/discover/udp_test.go
parent698e98d9814605bfea98ba3ad2fe7fda073cb2b1 (diff)
downloaddexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar.gz
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar.bz2
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar.lz
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar.xz
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.tar.zst
dexon-01ed3fa1a9414328eb6c4fc839e1b2044a786a7a.zip
p2p/discover: unlock the table during ping replacement
Table.mutex was being held while waiting for a reply packet, which effectively made many parts of the whole stack block on that packet, including the net_peerCount RPC call.
Diffstat (limited to 'p2p/discover/udp_test.go')
-rw-r--r--p2p/discover/udp_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/p2p/discover/udp_test.go b/p2p/discover/udp_test.go
index 8d6d3e855..b913424dd 100644
--- a/p2p/discover/udp_test.go
+++ b/p2p/discover/udp_test.go
@@ -167,7 +167,7 @@ func TestUDP_findnode(t *testing.T) {
for i := 0; i < bucketSize; i++ {
nodes.push(nodeAtDistance(test.table.self.sha, i+2), bucketSize)
}
- test.table.add(nodes.entries)
+ test.table.stuff(nodes.entries)
// ensure there's a bond with the test node,
// findnode won't be accepted otherwise.