diff --git a/consensus/core/src/network/tonic_network.rs b/consensus/core/src/network/tonic_network.rs index 1c2bee6ad75..d4698c52963 100644 --- a/consensus/core/src/network/tonic_network.rs +++ b/consensus/core/src/network/tonic_network.rs @@ -681,7 +681,6 @@ impl NetworkManager for TonicManager { let service = TonicServiceProxy::new(self.context.clone(), service); let config = &self.context.parameters.tonic; - #[allow(deprecated)] let consensus_service = Server::builder() .layer( TraceLayer::new_for_grpc() @@ -698,7 +697,9 @@ impl NetworkManager for TonicManager { .max_encoding_message_size(config.message_size_limit) .max_decoding_message_size(config.message_size_limit), ) - .into_router(); + .into_service() + .into_inner() + .into_axum_router(); let inbound_metrics = self.context.metrics.network_metrics.inbound.clone(); let excessive_message_size = self.context.parameters.tonic.excessive_message_size;