Skip to content

Commit

Permalink
xxx name duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed Mar 8, 2024
1 parent 82cb1a8 commit f8fb3cb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
10 changes: 8 additions & 2 deletions linera-rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ impl LocalValidatorNode for Client {
}
}

async fn subscribe(&mut self, chains: Vec<ChainId>) -> Result<Self::NotificationStream, NodeError> {
async fn subscribe(
&mut self,
chains: Vec<ChainId>,
) -> Result<Self::NotificationStream, NodeError> {
Ok(match self {
Client::Grpc(grpc_client) => Box::pin(grpc_client.subscribe(chains).await?),

Expand Down Expand Up @@ -199,7 +202,10 @@ impl ValidatorNodeInner for Client {
}
}

async fn subscribe(&mut self, chains: Vec<ChainId>) -> Result<Self::NotificationStream, NodeError> {
async fn subscribe(
&mut self,
chains: Vec<ChainId>,
) -> Result<Self::NotificationStream, NodeError> {
Ok(match self {
Client::Grpc(grpc_client) => Box::pin(grpc_client.subscribe(chains).await?),

Expand Down
10 changes: 5 additions & 5 deletions linera-rpc/src/grpc/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use super::{
transport, GrpcError, GRPC_MAX_MESSAGE_SIZE,
};
use crate::{
config::ValidatorPublicNetworkConfig, node_provider::NodeOptions,
HandleCertificateRequest, HandleLiteCertificateRequest,
config::ValidatorPublicNetworkConfig, node_provider::NodeOptions, HandleCertificateRequest,
HandleLiteCertificateRequest,
};
use futures::{future, stream, StreamExt};
use linera_base::identifiers::ChainId;
Expand All @@ -23,7 +23,7 @@ use linera_core::{
use linera_core::node::{LocalNotificationStream, LocalValidatorNode};
#[cfg(not(web))]
use {
super::ProtoConversionError,
super::GrpcProtoConversionError,
crate::{mass_client, RpcMessage},
linera_core::node::{NotificationStream, ValidatorNodeInner},
};
Expand Down Expand Up @@ -314,7 +314,7 @@ impl ValidatorNodeInner for GrpcClient {
client_delegate!(self, handle_chain_info_query, query)
}

#[instrument(target = "grpc_client", skip_all, err, fields(address = self.address))]
#[instrument(target = "grpc_client", skip_all, err, fields(address = self.address))]
async fn subscribe(
&mut self,
chains: Vec<ChainId>,
Expand Down Expand Up @@ -395,7 +395,7 @@ impl ValidatorNodeInner for GrpcClient {

#[cfg(not(web))]
#[async_trait::async_trait]
impl mass_client::MassClient for Client {
impl mass_client::MassClient for GrpcClient {
#[tracing::instrument(skip_all, err)]
async fn send(
&mut self,
Expand Down
2 changes: 1 addition & 1 deletion linera-rpc/src/grpc/node_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl GrpcNodeProvider {
}
}

impl LocalValidatorNodeProvider for NodeProvider {
impl LocalValidatorNodeProvider for GrpcNodeProvider {
type Node = GrpcClient;

fn make_node(&self, address: &str) -> anyhow::Result<Self::Node, NodeError> {
Expand Down
2 changes: 1 addition & 1 deletion linera-rpc/src/grpc/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ mod implementation {
pub fn create_channel(
address: String,
options: &Options,
) -> Result<Channel, super::super::Error> {
) -> Result<Channel, super::super::GrpcError> {
let mut channel = Channel::from_shared(address)?;
if let Some(connect_timeout) = options.connect_timeout {
channel = channel.connect_timeout(connect_timeout);
Expand Down

0 comments on commit f8fb3cb

Please sign in to comment.