network: extend Service with Name, use it to distinguish services

This commit is contained in:
Roman Khimov 2022-04-22 11:33:56 +03:00
parent a10b1ad32d
commit 2593bb0535
8 changed files with 41 additions and 10 deletions

View file

@ -204,6 +204,11 @@ func New(chain blockchainer.Blockchainer, conf rpc.Config, coreServer *network.S
}
}
// Name returns service name.
func (s *Server) Name() string {
return "rpc"
}
// Start creates a new JSON-RPC server listening on the configured port. It creates
// goroutines needed internally and it returns its errors via errChan passed to New().
func (s *Server) Start() {