ソースを参照

darkfid: update to new channels() API

draoi 2 年 前
コミット
fd728f4324
2 ファイル変更2 行追加2 行削除
  1. 1 1
      bin/darkfid/src/rpc_tx.rs
  2. 1 1
      bin/darkfid/src/task/sync.rs

+ 1 - 1
bin/darkfid/src/rpc_tx.rs

@@ -140,7 +140,7 @@ impl Darkfid {
         }
 
         self.sync_p2p.broadcast(&tx).await;
-        if self.sync_p2p.channels().await.is_empty() {
+        if self.sync_p2p.hosts().channels().await.is_empty() {
             error!(target: "darkfid::rpc::tx_broadcast", "Failed broadcasting tx, no connected channels");
             return server_error(RpcError::TxBroadcastFail, id, None)
         }

+ 1 - 1
bin/darkfid/src/task/sync.rs

@@ -36,7 +36,7 @@ pub async fn sync_task(node: &Darkfid) -> Result<()> {
     let mut peers = vec![];
     loop {
         // Grab channels
-        let channels = node.sync_p2p.channels().await;
+        let channels = node.sync_p2p.hosts().channels().await;
 
         // Check anyone is connected
         if !channels.is_empty() {