public GrpcServerServiceTests() { _networkServer = GetRequiredService <IAElfNetworkServer>(); _service = GetRequiredService <GrpcServerService>(); _blockchainService = GetRequiredService <IBlockchainService>(); _peerPool = GetRequiredService <IPeerPool>(); _eventBus = GetRequiredService <ILocalEventBus>(); }
public GrpcServerServiceTests() { _networkServer = GetRequiredService <IAElfNetworkServer>(); _serverService = GetRequiredService <GrpcServerService>(); _blockchainService = GetRequiredService <IBlockchainService>(); _peerPool = GetRequiredService <IPeerPool>(); _eventBus = GetRequiredService <ILocalEventBus>(); _nodeManager = GetRequiredService <INodeManager>(); _osTestHelper = GetRequiredService <OSTestHelper>(); _handshakeProvider = GetRequiredService <IHandshakeProvider>(); }
public IServer Initialize(string host, int port) { var grpcHost = host; if (host.StartsWith("http://")) { grpcHost = host.Substring("http://".Length); } this.ServerUrl = grpcHost + ":" + port; this.CoreServer = new Grpc.Core.Server { Services = { GrpcServerService.BindService(new GrpcService()) }, Ports = { new ServerPort(grpcHost, port, ServerCredentials.Insecure) } }; return(this); }