소스 검색

bin: Update RequestHandler users API

parazyd 3 년 전
부모
커밋
43e1c2f7a0
9개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 1 1
      bin/darkfid/src/main.rs
  2. 1 1
      bin/darkfid2/src/rpc.rs
  3. 1 1
      bin/darkirc/src/rpc.rs
  4. 1 1
      bin/faucetd/src/main.rs
  5. 1 1
      bin/fud/fud/src/main.rs
  6. 1 1
      bin/genev/genevd/src/rpc.rs
  7. 1 1
      bin/lilith/src/main.rs
  8. 1 1
      bin/tau/taud/src/jsonrpc.rs
  9. 1 1
      tests/jsonrpc.rs

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

@@ -255,7 +255,7 @@ impl RequestHandler for Darkfid {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/darkfid2/src/rpc.rs

@@ -84,7 +84,7 @@ impl RequestHandler for Darkfid {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/darkirc/src/rpc.rs

@@ -57,7 +57,7 @@ impl RequestHandler for JsonRpcInterface {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/faucetd/src/main.rs

@@ -202,7 +202,7 @@ impl RequestHandler for Faucetd {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/fud/fud/src/main.rs

@@ -121,7 +121,7 @@ impl RequestHandler for Fud {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/genev/genevd/src/rpc.rs

@@ -61,7 +61,7 @@ impl RequestHandler for JsonRpcInterface {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/lilith/src/main.rs

@@ -242,7 +242,7 @@ impl RequestHandler for Lilith {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
bin/tau/taud/src/jsonrpc.rs

@@ -81,7 +81,7 @@ impl RequestHandler for JsonRpcInterface {
         to_json_result(rep, req.id)
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }

+ 1 - 1
tests/jsonrpc.rs

@@ -67,7 +67,7 @@ impl RequestHandler for RpcSrv {
         }
     }
 
-    async fn get_connections(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
+    async fn connections_mut(&self) -> MutexGuard<'_, HashSet<StoppableTaskPtr>> {
         self.rpc_connections.lock().await
     }
 }