do join_all (#4832)

This commit is contained in:
Nikolay Volf
2020-02-06 13:07:52 +01:00
committed by GitHub
parent db4c8c03bb
commit 6148c7ce15
@@ -378,8 +378,13 @@ impl<B: ChainApi> Pool<B> {
let block_number = self.resolve_block_number(at)?;
let mut result = HashMap::new();
for xt in xts {
let (hash, validated_tx) = self.verify_one(at, block_number, xt, force).await;
for (hash, validated_tx) in
futures::future::join_all(
xts.into_iter()
.map(|xt| self.verify_one(at, block_number, xt, force))
)
.await
{
result.insert(hash, validated_tx);
}