|
|
@@ -3,6 +3,7 @@ package p2p
|
|
|
import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
+ "github.com/ethereum/go-ethereum/crypto"
|
|
|
"sync"
|
|
|
)
|
|
|
|
|
|
@@ -13,7 +14,7 @@ var (
|
|
|
// Server manages all peer connections.
|
|
|
type Server struct {
|
|
|
// Config fields may not be modified while the server is running.
|
|
|
- //Config
|
|
|
+ Config
|
|
|
|
|
|
// Hooks for testing. These are useful because we can inhibit
|
|
|
// the whole protocol stack.
|
|
|
@@ -56,3 +57,9 @@ func (srv *Server) Start() (err error) {
|
|
|
|
|
|
return nil
|
|
|
}
|
|
|
+
|
|
|
+func (srv *Server) setupLocalNode() (err error) {
|
|
|
+ _ = crypto.FromECDSAPub(&srv.PrivateKey.PublicKey)
|
|
|
+
|
|
|
+ return nil
|
|
|
+}
|