Propagate RPC through network service.

- Basic network message handler threading
- Correct references
This commit is contained in:
Age Manning
2019-03-17 21:49:56 +11:00
parent 7370306366
commit 9803ab30f2
11 changed files with 68 additions and 60 deletions

View File

@@ -19,17 +19,17 @@ impl From<u16> for RPCMethod {
#[derive(Debug, Clone)]
pub enum RPCRequest {
Hello(HelloBody),
Hello(HelloMessage),
}
#[derive(Debug, Clone)]
pub enum RPCResponse {
Hello(HelloBody),
Hello(HelloMessage),
}
// request/response structs for RPC methods
#[derive(Encode, Decode, Clone, Debug)]
pub struct HelloBody {
pub struct HelloMessage {
pub network_id: u8,
pub latest_finalized_root: Hash256,
pub latest_finalized_epoch: Epoch,