Remove proto.rs & move some definitions out of data.rs

This commit is contained in:
Alex Auvolat
2020-04-18 19:30:05 +02:00
parent f41583e1b7
commit bd1618e78e
9 changed files with 52 additions and 62 deletions
+11 -1
View File
@@ -14,11 +14,13 @@ use crate::data;
use crate::data::*;
use crate::error::Error;
use crate::membership::System;
use crate::proto::*;
use crate::rpc_client::*;
use crate::rpc_server::*;
use crate::server::Garage;
pub const INLINE_THRESHOLD: usize = 3072;
const BLOCK_RW_TIMEOUT: Duration = Duration::from_secs(42);
const NEED_BLOCK_QUERY_TIMEOUT: Duration = Duration::from_secs(5);
const RESYNC_RETRY_TIMEOUT: Duration = Duration::from_secs(10);
@@ -31,6 +33,14 @@ pub enum Message {
NeedBlockReply(bool),
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PutBlockMessage {
pub hash: Hash,
#[serde(with = "serde_bytes")]
pub data: Vec<u8>,
}
impl RpcMessage for Message {}
pub struct BlockManager {