[release/1.4.6] node, p2p: move network config out of Server

This silences a go vet message about copying p2p.Server in package node.

(cherry picked from commit 542b839ec7)
This commit is contained in:
Felix Lange
2016-05-18 11:31:00 +02:00
committed by Péter Szilágyi
parent 90beb6112e
commit 5fb29fd45f
4 changed files with 36 additions and 28 deletions

View File

@ -478,7 +478,8 @@ func TestDialResolve(t *testing.T) {
}
// Now run the task, it should resolve the ID once.
srv := &Server{ntab: table, Dialer: &net.Dialer{Deadline: time.Now().Add(-5 * time.Minute)}}
config := Config{Dialer: &net.Dialer{Deadline: time.Now().Add(-5 * time.Minute)}}
srv := &Server{ntab: table, Config: config}
tasks[0].Do(srv)
if !reflect.DeepEqual(table.resolveCalls, []discover.NodeID{dest.ID}) {
t.Fatalf("wrong resolve calls, got %v", table.resolveCalls)