From 542b839ec74ff0ce94ab0d34e25531f5819d95d1 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 18 May 2016 11:31:00 +0200 Subject: node, p2p: move network config out of Server This silences a go vet message about copying p2p.Server in package node. --- p2p/server.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'p2p/server.go') diff --git a/p2p/server.go b/p2p/server.go index 3b2f2b078..880aa7cf1 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -54,12 +54,8 @@ var errServerStopped = errors.New("server stopped") var srvjslog = logger.NewJsonLogger() -// Server manages all peer connections. -// -// The fields of Server are used as configuration parameters. -// You should set them before starting the Server. Fields may not be -// modified while the server is running. -type Server struct { +// Config holds Server options. +type Config struct { // This field must be set to a valid secp256k1 private key. PrivateKey *ecdsa.PrivateKey @@ -120,6 +116,12 @@ type Server struct { // If NoDial is true, the server will not dial any peers. NoDial bool +} + +// Server manages all peer connections. +type Server struct { + // Config fields may not be modified while the server is running. + Config // Hooks for testing. These are useful because we can inhibit // the whole protocol stack. -- cgit v1.2.3