Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run fetch_bundle futures concurrently #111

Open
thobson88 opened this issue Aug 9, 2023 · 0 comments
Open

Run fetch_bundle futures concurrently #111

thobson88 opened this issue Aug 9, 2023 · 0 comments

Comments

@thobson88
Copy link
Collaborator

The IONVerifier implementation of fetch_bundle() calls async methods to i) resolve the DID and ii) locate the relevant Bitcoin transaction:

pub async fn fetch_bundle(&self, did: &str) -> Result<(), VerifierError> {
    let (did_doc, did_doc_meta) = self.resolve_did(did).await?;
    let (block_hash, tx_index) = self.locate_transaction(did).await?;
    ...

Currently these calls are made in sequence, but we would like to have the two futures run concurrently, e.g. by using the futures::join! macro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant