Browse Source

darkfid/tests: disable pos test

skoupidi 2 years ago
parent
commit
4648b8fb26
2 changed files with 5 additions and 4 deletions
  1. 4 4
      bin/darkfid/src/tests/harness.rs
  2. 1 0
      bin/darkfid/src/tests/mod.rs

+ 4 - 4
bin/darkfid/src/tests/harness.rs

@@ -36,7 +36,7 @@ use num_bigint::BigUint;
 use url::Url;
 use url::Url;
 
 
 use crate::{
 use crate::{
-    //  proto::BlockInfoMessage,
+    proto::BlockInfoMessage,
     task::sync::sync_task,
     task::sync::sync_task,
     utils::{spawn_consensus_p2p, spawn_sync_p2p},
     utils::{spawn_consensus_p2p, spawn_sync_p2p},
     Darkfid,
     Darkfid,
@@ -168,12 +168,12 @@ impl Harness {
 
 
     pub async fn add_blocks(&self, blocks: &[BlockInfo]) -> Result<()> {
     pub async fn add_blocks(&self, blocks: &[BlockInfo]) -> Result<()> {
         // We simply broadcast the block using Alice's sync P2P
         // We simply broadcast the block using Alice's sync P2P
-        for _block in blocks {
-            //self.alice.sync_p2p.broadcast(&BlockInfoMessage::from(block)).await;
+        for block in blocks {
+            self.alice.sync_p2p.broadcast(&BlockInfoMessage::from(block)).await;
         }
         }
 
 
         // and then add it to her chain
         // and then add it to her chain
-        //self.alice.validator.add_blocks(blocks).await?;
+        self.alice.validator.add_blocks(blocks).await?;
 
 
         Ok(())
         Ok(())
     }
     }

+ 1 - 0
bin/darkfid/src/tests/mod.rs

@@ -84,6 +84,7 @@ async fn sync_pos_blocks_real(ex: Arc<Executor<'static>>) -> Result<()> {
 }
 }
 
 
 #[test]
 #[test]
+#[ignore]
 fn sync_pos_blocks() -> Result<()> {
 fn sync_pos_blocks() -> Result<()> {
     let ex = Arc::new(Executor::new());
     let ex = Arc::new(Executor::new());
     let (signal, shutdown) = smol::channel::unbounded::<()>();
     let (signal, shutdown) = smol::channel::unbounded::<()>();