Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
thibault-martinez committed Nov 20, 2023
1 parent e2703a1 commit 7be6fe9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bindings/core/src/method_handler/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub(crate) async fn call_client_method_internal(client: &Client, method: ClientM
}
ClientMethod::GetOutputsIgnoreErrors { output_ids } => {
let outputs_response = client
.get_outputs_with_metadata_ignore_errors(&output_ids)
.get_outputs_with_metadata_ignore_not_found(&output_ids)
.await?
.iter()
.map(OutputWithMetadataResponse::from)
Expand Down
12 changes: 6 additions & 6 deletions sdk/src/client/node_api/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ impl Client {
futures::future::try_join_all(output_ids.iter().map(|id| self.get_output(id))).await
}

/// Requests outputs by their output ID in parallel, ignoring failed requests.
/// Requests outputs by their output ID in parallel, ignoring outputs not found.
/// Useful to get data about spent outputs, that might not be pruned yet.
pub async fn get_outputs_ignore_errors(&self, output_ids: &[OutputId]) -> Result<Vec<Output>> {
pub async fn get_outputs_ignore_not_found(&self, output_ids: &[OutputId]) -> Result<Vec<Output>> {
Ok(
futures::future::join_all(output_ids.iter().map(|id| self.get_output(id)))
.await
Expand All @@ -48,8 +48,8 @@ impl Client {
futures::future::try_join_all(output_ids.iter().map(|id| self.get_output_metadata(id))).await
}

/// Requests metadata for outputs by their output ID in parallel, ignoring failed requests.
pub async fn get_outputs_metadata_ignore_errors(&self, output_ids: &[OutputId]) -> Result<Vec<OutputMetadata>> {
/// Requests metadata for outputs by their output ID in parallel, ignoring outputs not found.
pub async fn get_outputs_metadata_ignore_not_found(&self, output_ids: &[OutputId]) -> Result<Vec<OutputMetadata>> {
Ok(
futures::future::join_all(output_ids.iter().map(|id| self.get_output_metadata(id)))
.await
Expand All @@ -64,9 +64,9 @@ impl Client {
futures::future::try_join_all(output_ids.iter().map(|id| self.get_output_with_metadata(id))).await
}

/// Requests outputs and their metadata by their output ID in parallel, ignoring failed requests.
/// Requests outputs and their metadata by their output ID in parallel, ignoring outputs not found.
/// Useful to get data about spent outputs, that might not be pruned yet.
pub async fn get_outputs_with_metadata_ignore_errors(
pub async fn get_outputs_with_metadata_ignore_not_found(
&self,
output_ids: &[OutputId],
) -> Result<Vec<OutputWithMetadata>> {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/wallet/operations/syncing/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ where
log::debug!("[SYNC] spent_or_not_synced_outputs: {spent_or_not_synced_output_ids:?}");
let spent_or_unsynced_output_metadata_responses = self
.client()
.get_outputs_metadata_ignore_errors(&spent_or_not_synced_output_ids)
.get_outputs_metadata_ignore_not_found(&spent_or_not_synced_output_ids)
.await?;

// Add the output response to the output ids, the output response is optional, because an output could be
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/wallet/operations/syncing/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ pub(crate) async fn get_inputs_for_transaction_payload(
.collect::<Vec<_>>();

client
.get_outputs_with_metadata_ignore_errors(&output_ids)
.get_outputs_with_metadata_ignore_not_found(&output_ids)
.await
.map_err(|e| e.into())
}

0 comments on commit 7be6fe9

Please sign in to comment.