diff --git a/applications/minotari_app_grpc/proto/base_node.proto b/applications/minotari_app_grpc/proto/base_node.proto index dfc1c8e525..d27fb38d40 100644 --- a/applications/minotari_app_grpc/proto/base_node.proto +++ b/applications/minotari_app_grpc/proto/base_node.proto @@ -356,6 +356,7 @@ message SyncProgressResponse { uint64 tip_height = 1; uint64 local_height = 2; SyncState state = 3; + string short_desc = 4; } enum SyncState { diff --git a/applications/minotari_node/src/grpc/base_node_grpc_server.rs b/applications/minotari_node/src/grpc/base_node_grpc_server.rs index 6808594afc..d9b894e82e 100644 --- a/applications/minotari_node/src/grpc/base_node_grpc_server.rs +++ b/applications/minotari_node/src/grpc/base_node_grpc_server.rs @@ -2003,26 +2003,31 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { .borrow() .state_info .clone(); + let short_desc = state.short_desc(); let response = match state { StateInfo::HeaderSync(None) => tari_rpc::SyncProgressResponse { tip_height: 0, local_height: 0, state: tari_rpc::SyncState::HeaderStarting.into(), + short_desc, }, StateInfo::HeaderSync(Some(info)) => tari_rpc::SyncProgressResponse { tip_height: info.tip_height, local_height: info.local_height, state: tari_rpc::SyncState::Header.into(), + short_desc, }, StateInfo::Connecting(_) => tari_rpc::SyncProgressResponse { tip_height: 0, local_height: 0, state: tari_rpc::SyncState::BlockStarting.into(), + short_desc, }, StateInfo::BlockSync(info) => tari_rpc::SyncProgressResponse { tip_height: info.tip_height, local_height: info.local_height, state: tari_rpc::SyncState::Block.into(), + short_desc, }, _ => tari_rpc::SyncProgressResponse { tip_height: 0, @@ -2032,6 +2037,7 @@ impl tari_rpc::base_node_server::BaseNode for BaseNodeGrpcServer { } else { tari_rpc::SyncState::Startup.into() }, + short_desc, }, }; Ok(Response::new(response))