This commit is contained in:
John Smith
2022-11-26 21:37:23 -05:00
parent 5df46aecae
commit b1bdf76ae8
80 changed files with 865 additions and 700 deletions

View File

@@ -15,7 +15,7 @@ impl fmt::Debug for VeilidAPIInner {
impl Drop for VeilidAPIInner {
fn drop(&mut self) {
if let Some(context) = self.context.take() {
intf::spawn_detached(api_shutdown(context));
spawn_detached(api_shutdown(context));
}
}
}

View File

@@ -1826,7 +1826,7 @@ impl SignedDirectNodeInfo {
node_info: NodeInfo,
secret: &DHTKeySecret,
) -> Result<Self, VeilidAPIError> {
let timestamp = intf::get_timestamp();
let timestamp = get_timestamp();
let node_info_bytes = Self::make_signature_bytes(&node_info, timestamp)?;
let signature = sign(&node_id.key, secret, &node_info_bytes)?;
Ok(Self {
@@ -1858,7 +1858,7 @@ impl SignedDirectNodeInfo {
Self {
node_info,
signature: None,
timestamp: intf::get_timestamp(),
timestamp: get_timestamp(),
}
}
@@ -1906,7 +1906,7 @@ impl SignedRelayedNodeInfo {
relay_info: SignedDirectNodeInfo,
secret: &DHTKeySecret,
) -> Result<Self, VeilidAPIError> {
let timestamp = intf::get_timestamp();
let timestamp = get_timestamp();
let node_info_bytes =
Self::make_signature_bytes(&node_info, &relay_id, &relay_info, timestamp)?;
let signature = sign(&node_id.key, secret, &node_info_bytes)?;