aboutsummaryrefslogtreecommitdiff
path: root/p2p/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/src/lib.rs')
-rw-r--r--p2p/src/lib.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs
index fc2c26d..c873980 100644
--- a/p2p/src/lib.rs
+++ b/p2p/src/lib.rs
@@ -7,9 +7,9 @@
//! use easy_parallel::Parallel;
//! use smol::{future, Executor};
//!
-//! use karyon_core::crypto::{KeyPair, KeyPairType};
-//! use karyon_p2p::{Backend, Config, PeerID};
+//! use karyon_p2p::{Backend, Config, PeerID, keypair::{KeyPair, KeyPairType}};
//!
+//! // Generate a new keypair for the peer
//! let key_pair = KeyPair::generate(&KeyPairType::Ed25519);
//!
//! // Create the configuration for the backend.
@@ -23,7 +23,9 @@
//!
//! let task = async {
//! // Run the backend
-//! backend.run().await.unwrap();
+//! backend.run()
+//! .await
+//! .expect("start the backend");
//!
//! // ....
//!