We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unwrap
1 parent a633353 commit a05eec0Copy full SHA for a05eec0
src/network.rs
@@ -257,15 +257,18 @@ impl<'a> Network<'a> {
257
258
let blocks = join_all(blocks).await;
259
260
- let mut res = vec![];
+ let mut latest_blocks = vec![];
261
for block in blocks {
262
- //TODO
263
- res.push(BlockWithTransactionReceipts {
264
- block: block.unwrap().unwrap(),
265
- transaction_receipts: None,
266
- });
+ if let Ok(block) = block {
+ if let Some(block) = block {
+ latest_blocks.push(BlockWithTransactionReceipts {
+ block,
+ transaction_receipts: None,
267
+ });
268
+ }
269
270
}
- Ok(res)
271
+ Ok(latest_blocks)
272
273
274
async fn get_latest_transactions(
0 commit comments