Skip to content

Commit

Permalink
Merge pull request #3626 from greymistcube/refactor/remove-enumerable…
Browse files Browse the repository at this point in the history
…-extensions

♻️ 🧹 Removed `EnumerableExtensions`
  • Loading branch information
greymistcube authored Jan 22, 2024
2 parents 6676313 + ff138fe commit 9c7ea1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 103 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ To be released.
- Removed `IBlockChainStates.GetValidatorSet(BlockHash?)` method.
- (@planetarium/tx) Remove the `T` generic argument of `SignedTx<T>`.
[[#3512]]
- (Libplanet.Common) Removed `EnumerableExtensions` class. [[#3625], [#3626]]

### Backward-incompatible network protocol changes

Expand Down Expand Up @@ -82,6 +83,8 @@ To be released.
[#3540]: https://github.com/planetarium/libplanet/pull/3540
[#3583]: https://github.com/planetarium/libplanet/pull/3583
[#3589]: https://github.com/planetarium/libplanet/pull/3589
[#3625]: https://github.com/planetarium/libplanet/issues/3625
[#3626]: https://github.com/planetarium/libplanet/pull/3626


Version 3.9.5
Expand Down
102 changes: 0 additions & 102 deletions Libplanet.Common/EnumerableExtensions.cs

This file was deleted.

4 changes: 3 additions & 1 deletion Libplanet.Net/Swarm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
using Bencodex;
using Libplanet.Action;
using Libplanet.Blockchain;
#if NETSTANDARD2_0
using Libplanet.Common;
#endif
using Libplanet.Crypto;
using Libplanet.Net.Consensus;
using Libplanet.Net.Messages;
Expand Down Expand Up @@ -594,7 +596,7 @@ public async Task PreloadAsync(
Block localTip = BlockChain.Tip;
IBlockExcerpt topmostTip = peersWithExcerpts
.Select(pair => pair.Item2)
.Greatest(tip => tip.Index);
.Aggregate((prev, next) => prev.Index > next.Index ? prev : next);
if (topmostTip.Index - (i > 0 ? tipDeltaThreshold : 0L) <= localTip.Index)
{
const string msg =
Expand Down

0 comments on commit 9c7ea1c

Please sign in to comment.