Skip to content

Commit

Permalink
Replace CallAll with FuturesUnordered
Browse files Browse the repository at this point in the history
Make it more consistent with the rest of the code, and make sure that
the `len()` method is available to use for tracing.

Co-authored-by: teor <teor@riseup.net>
  • Loading branch information
jvff and teor2345 authored Jun 15, 2021
1 parent 0dcdd89 commit 168ff91
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions zebra-consensus/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,19 +414,17 @@ where
let upgrade = request.upgrade(network);

let verify_requests =
stream::iter((0..inputs.len()).into_iter().map(move |input_index| {
script::Request {
(0..inputs.len()).into_iter().map(move |input_index| {
let request = script::Request {
upgrade,
known_utxos: known_utxos.clone(),
cached_ffi_transaction: cached_ffi_transaction.clone(),
input_index,
}
}));
};
script_verifier.clone().oneshot(request)
}).collect();

Ok(script_verifier
.call_all(verify_requests)
.unordered()
.boxed())
Ok(verify_requests)
}
}
}

0 comments on commit 168ff91

Please sign in to comment.