Skip to content

Commit

Permalink
Merge pull request #3947 from greymistcube/chore/cleanup
Browse files Browse the repository at this point in the history
🧹 📝 Minor docs change
  • Loading branch information
greymistcube authored Sep 5, 2024
2 parents 475d433 + 99a0b9f commit f8e7c93
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ Version 5.2.2

Released on August 8, 2024.

- Ported changes from [Libplanet 5.2.2] release. [[#3915]]
- (Libplanet.Explorer) Fix an issue with high CPU usage
when querying blocks [[#3897]]

[#3915]: https://github.com/planetarium/libplanet/pull/3915
[Libplanet 5.2.2]: https://www.nuget.org/packages/Libplanet/5.2.2
[#3897]: https://github.com/planetarium/libplanet/pull/3897


Version 5.2.1
Expand Down
18 changes: 18 additions & 0 deletions src/Libplanet.Net/Swarm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,24 @@ internal async Task<List<BlockHash>> GetBlockHashes(
}
}

/// <summary>
/// Download <see cref="Block"/>s corresponding to <paramref name="blockHashes"/>
/// from <paramref name="peer"/>.
/// </summary>
/// <param name="peer">A <see cref="BoundPeer"/> to request <see cref="Block"/>s from.
/// </param>
/// <param name="blockHashes">A <see cref="List{T}"/> of <see cref="BlockHash"/>es
/// of <see cref="Block"/>s to be downloaded from <paramref name="peer"/>.</param>
/// <param name="cancellationToken">A cancellation token used to propagate notification
/// that this operation should be canceled.</param>
/// <returns>An <see cref="IAsyncEnumerable{T}"/> of <see cref="Block"/> and
/// <see cref="BlockCommit"/> pairs corresponding to <paramref name="blockHashes"/>.
/// Returned <see cref="Block"/>s are guaranteed to correspond to the initial part of
/// <paramref name="blockHashes"/>, including the empty list and the full list in order.
/// </returns>
/// <exception cref="InvalidMessageContentException">Thrown when
/// a message other than <see cref="BlocksMsg"/> is received while
/// trying to get <see cref="Block"/>s from <paramref name="peer"/>.</exception>
internal async IAsyncEnumerable<(Block, BlockCommit)> GetBlocksAsync(
BoundPeer peer,
List<BlockHash> blockHashes,
Expand Down

0 comments on commit f8e7c93

Please sign in to comment.