Rename proto NodeInfo -> NodeInfoResponse

This commit is contained in:
Paul Hauner 2019-03-26 15:04:39 +11:00
parent e702896bee
commit 3756d8d681
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6
2 changed files with 6 additions and 7 deletions

View File

@ -1,7 +1,7 @@
use crate::beacon_chain::BeaconChain; use crate::beacon_chain::BeaconChain;
use futures::Future; use futures::Future;
use grpcio::{RpcContext, UnarySink}; use grpcio::{RpcContext, UnarySink};
use protos::services::{Empty, Fork, NodeInfo}; use protos::services::{Empty, Fork, NodeInfoResponse};
use protos::services_grpc::BeaconNodeService; use protos::services_grpc::BeaconNodeService;
use slog::{trace, warn}; use slog::{trace, warn};
use std::sync::Arc; use std::sync::Arc;
@ -14,11 +14,11 @@ pub struct BeaconNodeServiceInstance {
impl BeaconNodeService for BeaconNodeServiceInstance { impl BeaconNodeService for BeaconNodeServiceInstance {
/// Provides basic node information. /// Provides basic node information.
fn info(&mut self, ctx: RpcContext, _req: Empty, sink: UnarySink<NodeInfo>) { fn info(&mut self, ctx: RpcContext, _req: Empty, sink: UnarySink<NodeInfoResponse>) {
trace!(self.log, "Node info requested via RPC"); trace!(self.log, "Node info requested via RPC");
// build the response // build the response
let mut node_info = NodeInfo::new(); let mut node_info = NodeInfoResponse::new();
node_info.set_version(version::version()); node_info.set_version(version::version());
// get the chain state // get the chain state

View File

@ -14,7 +14,7 @@ package ethereum.beacon.rpc.v1;
// Service that currently identifies a beacon node // Service that currently identifies a beacon node
service BeaconNodeService { service BeaconNodeService {
rpc Info(Empty) returns (NodeInfo); rpc Info(Empty) returns (NodeInfoResponse);
} }
/// Service that handles block production /// Service that handles block production
@ -40,7 +40,7 @@ service AttestationService {
/* /*
* Beacon Node Service Message * Beacon Node Service Message
*/ */
message NodeInfo { message NodeInfoResponse {
string version = 1; string version = 1;
Fork fork = 2; Fork fork = 2;
uint32 chain_id = 3; uint32 chain_id = 3;
@ -53,8 +53,7 @@ message Fork {
uint64 epoch = 3; uint64 epoch = 3;
} }
message Empty { message Empty {}
}
/* /*