Skip to content

Commit

Permalink
do not modify cargo.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanKung committed May 11, 2023
1 parent 432a264 commit 496a368
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/src/dht/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,13 @@ pub trait LiveDid: Into<Did> + Clone {
async fn live(&self) -> bool;
}


/// Trait `LiveDid` defines a wrapper for `Did` that can check whether the `Did` is live or not.
///
/// Implementors of this trait must also be convertible into a `Did` type using the `Into` trait, and
/// must satisfy some additional constraints (see below).
#[cfg(not(feature = "wasm"))]
#[async_trait]
pub trait LiveDid: Into<Did> + Clone + Send + Sync{
pub trait LiveDid: Into<Did> + Clone + Send + Sync {
/// Necessary method, should return true if a wrapped did is live.
async fn live(&self) -> bool;
}
4 changes: 3 additions & 1 deletion core/src/message/handlers/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ pub mod tests {
Ok(())
}

#[cfg(feature = "experimental")]
async fn check_update_successor(
node: &MessageHandler,
expect_successors: Option<&Vec<Did>>,
Expand All @@ -522,6 +523,7 @@ pub mod tests {
Ok(())
}

#[cfg(feature = "experimental")]
async fn check_connect_by_hop(
node: &MessageHandler,
dest: Did,
Expand Down Expand Up @@ -1112,7 +1114,7 @@ pub mod tests {

// 1. node1 to node2
// 2. node 3 to node 2
test_triple_ordered_nodes_connection(&node1, &node2, &node3, Some(&mut ctx)).await?;
test_triple_ordered_nodes_connection(&node1, &node2, &node3, Some(&ctx)).await?;
// we now have triple connected node

let did1 = node1.swarm.did();
Expand Down
2 changes: 1 addition & 1 deletion node/src/tests/wasm/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use wasm_bindgen_test::*;

use crate::prelude::rings_core::async_trait;
use crate::prelude::rings_core::dht::Stabilization;
use crate::prelude::rings_core::dht::TStabilize;
use crate::prelude::rings_core::dht::TStabilizeWait;
use crate::prelude::rings_core::message::CallbackFn;
use crate::prelude::rings_core::message::MessageCallback;
use crate::prelude::rings_core::storage::PersistenceStorage;
Expand Down

0 comments on commit 496a368

Please sign in to comment.