public async Task StartConsensusRpc(ConsensusServerRpcOptions options) { var certificateTask = ReadFileAsync(options.CertificatePath); var client = WalletLoaderService.NewClient(_channel); var request = new StartConsensusRpcRequest { NetworkAddress = options.NetworkAddress, Username = options.RpcUser, Password = ByteString.CopyFromUtf8(options.RpcPassword), Certificate = ByteString.CopyFrom(await certificateTask), }; await client.StartConsensusRpcAsync(request, cancellationToken : _tokenSource.Token); }
public async Task StartConsensusRpc(ConsensusServerRpcOptions options) { var certificateTask = ReadFileAsync(options.CertificatePath); var client = new WalletLoaderService.WalletLoaderServiceClient(_channel); var request = new StartConsensusRpcRequest { NetworkAddress = options.NetworkAddress, Username = options.RpcUser, Password = ByteString.CopyFromUtf8(options.RpcPassword), Certificate = ByteString.CopyFrom(await certificateTask), }; await client.StartConsensusRpcAsync(request, cancellationToken: _tokenSource.Token); }