Ver Fonte

ping: cleanup and move to script/

darkfi há 2 anos atrás
pai
commit
3b421bb8e3
3 ficheiros alterados com 6 adições e 9 exclusões
  1. 3 1
      Cargo.toml
  2. 0 0
      script/ping/Cargo.toml
  3. 3 8
      script/ping/src/main.rs

+ 3 - 1
Cargo.toml

@@ -34,7 +34,6 @@ members = [
     #"bin/tau/tau-cli",
     "bin/vanityaddr",
     "bin/lilith",
-    "bin/ping",
 
     "src/sdk",
     "src/sdk/python",
@@ -49,6 +48,9 @@ members = [
     "src/contract/deployooor",
 
     "example/dchat/dchatd",
+
+    # Utils
+    "script/ping",
 ]
 
 [dependencies]

+ 0 - 0
bin/ping/Cargo.toml → script/ping/Cargo.toml


+ 3 - 8
bin/ping/src/main.rs → script/ping/src/main.rs

@@ -16,13 +16,8 @@
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 use darkfi::net;
-use darkfi_serial::{
-    async_trait, AsyncDecodable, AsyncEncodable, SerialDecodable, SerialEncodable, VarInt,
-};
-use smol::{
-    io::{self, AsyncRead, AsyncReadExt, AsyncWriteExt, ReadHalf, WriteHalf},
-    lock::RwLock as AsyncRwLock,
-};
+use darkfi_serial::{AsyncDecodable, VarInt};
+use smol::io::AsyncReadExt;
 use std::sync::Arc;
 use url::Url;
 
@@ -59,7 +54,7 @@ fn main() {
     let (signal, shutdown) = smol::channel::unbounded::<()>();
 
     let ex = Arc::new(smol::Executor::new());
-    let task = ex.spawn(async {
+    let _task = ex.spawn(async {
         ping().await;
         let _ = signal.send(()).await;
     });