فهرست منبع

bin: Update RequestHandler users API

parazyd 2 سال پیش
والد
کامیت
43e1c2f7a0

+ 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
     }
 }