lbry.go/dht/bootstrap_test.go
2018-05-13 17:33:49 -04:00

20 lines
330 B
Go

package dht
import (
"net"
"testing"
)
func TestBootstrapPing(t *testing.T) {
b := NewBootstrapNode(RandomBitmapP(), 10, bootstrapDefaultRefreshDuration)
listener, err := net.ListenPacket(network, "127.0.0.1:54320")
if err != nil {
panic(err)
}
b.Connect(listener.(*net.UDPConn))
defer b.Shutdown()
b.Shutdown()
}