Skip to content

Commit

Permalink
chore(consensus): Update deprecated into_router call (#3559)
Browse files Browse the repository at this point in the history
* chore(consensus): Update deprecated `into_router` call

* fmt
  • Loading branch information
DaughterOfMars authored Oct 23, 2024
1 parent ef4dabf commit 69cef80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions consensus/core/src/network/tonic_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,6 @@ impl<S: NetworkService> NetworkManager<S> 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()
Expand All @@ -698,7 +697,9 @@ impl<S: NetworkService> NetworkManager<S> 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;
Expand Down

0 comments on commit 69cef80

Please sign in to comment.