refactor
This commit is contained in:
@@ -269,8 +269,8 @@ impl RPCProcessor {
|
||||
}
|
||||
|
||||
// Search the DHT for a specific node corresponding to a key unless we have that node in our routing table already, and return the node reference
|
||||
// Note: This routine can possible be recursive, hence the SystemPinBoxFuture async form
|
||||
pub fn resolve_node(&self, node_id: DHTKey) -> SystemPinBoxFuture<Result<NodeRef, RPCError>> {
|
||||
// Note: This routine can possible be recursive, hence the SendPinBoxFuture async form
|
||||
pub fn resolve_node(&self, node_id: DHTKey) -> SendPinBoxFuture<Result<NodeRef, RPCError>> {
|
||||
let this = self.clone();
|
||||
Box::pin(async move {
|
||||
let routing_table = this.routing_table();
|
||||
|
@@ -3,6 +3,7 @@ use super::*;
|
||||
impl RPCProcessor {
|
||||
// Send FindNodeQ RPC request, receive FindNodeA answer
|
||||
// Can be sent via all methods including relays and routes
|
||||
#[instrument(level = "trace", skip(self), ret, err)]
|
||||
pub async fn rpc_call_find_node(
|
||||
self,
|
||||
dest: Destination,
|
||||
|
@@ -3,6 +3,7 @@ use super::*;
|
||||
impl RPCProcessor {
|
||||
// Sends a our node info to another node
|
||||
// Can be sent via all methods including relays and routes
|
||||
#[instrument(level = "trace", skip(self), ret, err)]
|
||||
pub async fn rpc_call_node_info_update(
|
||||
self,
|
||||
dest: Destination,
|
||||
|
@@ -3,6 +3,7 @@ use super::*;
|
||||
impl RPCProcessor {
|
||||
// Sends a unidirectional in-band return receipt
|
||||
// Can be sent via all methods including relays and routes
|
||||
#[instrument(level = "trace", skip(self, receipt), ret, err)]
|
||||
pub async fn rpc_call_return_receipt<D: AsRef<[u8]>>(
|
||||
self,
|
||||
dest: Destination,
|
||||
|
@@ -3,6 +3,7 @@ use super::*;
|
||||
impl RPCProcessor {
|
||||
// Sends a unidirectional signal to a node
|
||||
// Can be sent via all methods including relays and routes
|
||||
#[instrument(level = "trace", skip(self), ret, err)]
|
||||
pub async fn rpc_call_signal(
|
||||
self,
|
||||
dest: Destination,
|
||||
|
@@ -3,6 +3,7 @@ use super::*;
|
||||
impl RPCProcessor {
|
||||
// Send StatusQ RPC request, receive StatusA answer
|
||||
// Can be sent via relays, but not via routes
|
||||
#[instrument(level = "trace", skip(self), ret, err)]
|
||||
pub async fn rpc_call_status(self, peer: NodeRef) -> Result<Answer<SenderInfo>, RPCError> {
|
||||
let node_status = self.network_manager().generate_node_status();
|
||||
let status_q = RPCOperationStatusQ { node_status };
|
||||
|
@@ -2,6 +2,7 @@ use super::*;
|
||||
|
||||
impl RPCProcessor {
|
||||
// Can only be sent directly, not via relays or routes
|
||||
#[instrument(level = "trace", skip(self), ret, err)]
|
||||
pub async fn rpc_call_validate_dial_info(
|
||||
self,
|
||||
peer: NodeRef,
|
||||
|
Reference in New Issue
Block a user