diff options
Diffstat (limited to 'src/proto.rs')
-rw-r--r-- | src/proto.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/proto.rs b/src/proto.rs index d1d4fb59..04b8e2b2 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -16,6 +16,9 @@ pub enum Message { PullConfig, AdvertiseNodesUp(Vec<AdvertisedNode>), AdvertiseConfig(NetworkConfig), + + PutBlock(PutBlockMessage), + AdvertiseVersion(VersionMeta), } #[derive(Debug, Serialize, Deserialize)] @@ -32,3 +35,11 @@ pub struct AdvertisedNode { pub id: UUID, pub addr: SocketAddr, } + +#[derive(Debug, Serialize, Deserialize)] +pub struct PutBlockMessage { + pub meta: BlockMeta, + + #[serde(with="serde_bytes")] + pub data: Vec<u8>, +} |