p2p: access embedded fields of Server directly (#27078)

This commit is contained in:
joohhnnn 2023-04-18 17:57:08 +08:00 committed by GitHub
parent 5e4d726e2a
commit b1972627d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -443,7 +443,7 @@ func (srv *Server) Start() (err error) {
return errors.New("server already running")
}
srv.running = true
srv.log = srv.Config.Logger
srv.log = srv.Logger
if srv.log == nil {
srv.log = log.Root()
}
@ -501,7 +501,7 @@ func (srv *Server) setupLocalNode() error {
sort.Sort(capsByNameAndVersion(srv.ourHandshake.Caps))
// Create the local node.
db, err := enode.OpenDB(srv.Config.NodeDatabase)
db, err := enode.OpenDB(srv.NodeDatabase)
if err != nil {
return err
}