Commit 29af134a authored by Abhishek Upperwal's avatar Abhishek Upperwal
Browse files

corrected transport init

parent fb401957
...@@ -46,7 +46,7 @@ func TestDefaultListenAddrs(t *testing.T) { ...@@ -46,7 +46,7 @@ func TestDefaultListenAddrs(t *testing.T) {
// Test 1: Listen addr should not set if user defined transport is passed. // Test 1: Listen addr should not set if user defined transport is passed.
h, err := New( h, err := New(
ctx, ctx,
Transport(tcp.TcpTransport{}), Transport(tcp.NewTCPTransport),
) )
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -60,7 +60,7 @@ func TestDefaultListenAddrs(t *testing.T) { ...@@ -60,7 +60,7 @@ func TestDefaultListenAddrs(t *testing.T) {
// Test 2: User defined listener addrs should overwrite the default options. // Test 2: User defined listener addrs should overwrite the default options.
h, err = New( h, err = New(
ctx, ctx,
Transport(tcp.TcpTransport{}), Transport(tcp.NewTCPTransport),
ListenAddrStrings("/ip4/127.0.0.1/tcp/0"), ListenAddrStrings("/ip4/127.0.0.1/tcp/0"),
) )
if err != nil { if err != nil {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment