This commit is contained in:
John Smith
2023-04-22 20:48:24 -04:00
parent 438553a1ca
commit cb4abaefd7
29 changed files with 334 additions and 284 deletions

View File

@@ -8,10 +8,10 @@ use super::*;
pub struct VeilidAppMessage {
/// Some(sender) if the message was sent directly, None if received via a private/safety route
#[serde(with = "opt_json_as_string")]
pub sender: Option<PublicKey>,
sender: Option<PublicKey>,
/// The content of the message to deliver to the application
#[serde(with = "json_as_base64")]
pub message: Vec<u8>,
message: Vec<u8>,
}
impl VeilidAppMessage {

View File

@@ -25,11 +25,11 @@ impl DHTRecordDescriptor {
Self { owner, schema }
}
pub fn owner(&self) -> PublicKey {
self.owner
pub fn owner(&self) -> &PublicKey {
&self.owner
}
pub fn schema(&self) -> DHTSchema {
self.schema
pub fn schema(&self) -> &DHTSchema {
&self.schema
}
}

View File

@@ -58,7 +58,7 @@ impl DHTSchemaSMPL {
// o_cnt
out.extend_from_slice(&self.o_cnt.to_le_bytes());
// members
for m in self.members {
for m in &self.members {
// m_key
out.extend_from_slice(&m.m_key.bytes);
// m_cnt