mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
rpc/server: move to services/rpcsrv
`server` is not a good package name and it's an internal service, so it can be just about anywhere.
This commit is contained in:
parent
7118b4f4ea
commit
43a59adbd0
24 changed files with 25 additions and 25 deletions
|
@ -22,7 +22,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/io"
|
||||
"github.com/nspcc-dev/neo-go/pkg/network"
|
||||
"github.com/nspcc-dev/neo-go/pkg/network/metrics"
|
||||
"github.com/nspcc-dev/neo-go/pkg/rpc/server"
|
||||
"github.com/nspcc-dev/neo-go/pkg/services/rpcsrv"
|
||||
"github.com/nspcc-dev/neo-go/pkg/services/notary"
|
||||
"github.com/nspcc-dev/neo-go/pkg/services/oracle"
|
||||
"github.com/nspcc-dev/neo-go/pkg/services/stateroot"
|
||||
|
@ -505,7 +505,7 @@ func startServer(ctx *cli.Context) error {
|
|||
return cli.NewExitError(err, 1)
|
||||
}
|
||||
errChan := make(chan error)
|
||||
rpcServer := server.New(chain, cfg.ApplicationConfiguration.RPC, serv, oracleSrv, log, errChan)
|
||||
rpcServer := rpcsrv.New(chain, cfg.ApplicationConfiguration.RPC, serv, oracleSrv, log, errChan)
|
||||
serv.AddService(&rpcServer)
|
||||
|
||||
go serv.Start(errChan)
|
||||
|
@ -532,7 +532,7 @@ Main:
|
|||
case syscall.SIGHUP:
|
||||
log.Info("SIGHUP received, restarting rpc-server")
|
||||
rpcServer.Shutdown()
|
||||
rpcServer = server.New(chain, cfg.ApplicationConfiguration.RPC, serv, oracleSrv, log, errChan)
|
||||
rpcServer = rpcsrv.New(chain, cfg.ApplicationConfiguration.RPC, serv, oracleSrv, log, errChan)
|
||||
serv.AddService(&rpcServer) // Replaces old one by service name.
|
||||
if !cfg.ApplicationConfiguration.RPC.StartWhenSynchronized || serv.IsInSync() {
|
||||
rpcServer.Start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue