Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Swarm<T>.GetDemandBlockHashes() from being hanged when a peer's chain is during reorg #884

Merged
merged 3 commits into from
May 29, 2020

Conversation

dahlia
Copy link
Contributor

@dahlia dahlia commented May 28, 2020

This fixes the bug #880.

  • Make Swarm<T>.GetDemandBlockHashes() method internal (was private) and add unit tests on it.
  • Prevent Swarm<T>.GetDemandBlockHashes() method from being hanged when a peer's chain is during reorg.

@dahlia dahlia added the bug Something isn't working label May 28, 2020
@dahlia dahlia self-assigned this May 28, 2020
@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #884 into 0.9-maintenance will decrease coverage by 0.27%.
The diff coverage is 86.00%.

@@                 Coverage Diff                 @@
##           0.9-maintenance     #884      +/-   ##
===================================================
- Coverage            87.56%   87.29%   -0.28%     
===================================================
  Files                  250      247       -3     
  Lines                22675    22062     -613     
===================================================
- Hits                 19856    19259     -597     
+ Misses                1473     1468       -5     
+ Partials              1346     1335      -11     
Impacted Files Coverage Δ
Libplanet.Tests/ActionProgress.cs 66.66% <66.66%> (ø)
Libplanet/Net/Swarm.cs 85.42% <73.68%> (+0.45%) ⬆️
Libplanet.Tests/Net/SwarmTest.Preload.cs 99.26% <100.00%> (+0.05%) ⬆️
Libplanet/Blocks/BlockDigest.cs 76.31% <0.00%> (-10.53%) ⬇️
Libplanet/Net/NetMQTransport.cs 80.69% <0.00%> (-3.49%) ⬇️
Libplanet.RocksDBStore.Tests/RocksDBStoreTest.cs
...ibplanet.RocksDBStore.Tests/RocksDBStoreFixture.cs
Libplanet.RocksDBStore/RocksDBStore.cs
Libplanet.RocksDBStore/RocksDBStoreBitConverter.cs
... and 4 more

earlbread
earlbread previously approved these changes May 29, 2020
@dahlia dahlia merged commit aeabbe1 into planetarium:0.9-maintenance May 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants