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

Fix FindBranchPoint #468

Merged
merged 1 commit into from Aug 28, 2019

Conversation

@earlbread
Copy link
Member

commented Aug 27, 2019

This fixes an issue where FindBranchPoint() returns a branch point if it exists in the BlockSet even if the block does not exist in the chain.

@earlbread earlbread added the bug label Aug 27, 2019

@earlbread earlbread requested review from dahlia, longfin, limebell and moreal Aug 27, 2019

@earlbread earlbread self-assigned this Aug 27, 2019

@dahlia
dahlia approved these changes Aug 27, 2019
@dahlia
Copy link
Member

left a comment

A changelog for this is necessary, and IMHO it should be merged to 0.5-maintenance first.

@codecov

This comment has been minimized.

Copy link

commented Aug 27, 2019

Codecov Report

Merging #468 into 0.5-maintenance will increase coverage by 0.01%.
The diff coverage is 100%.

@@                 Coverage Diff                 @@
##           0.5-maintenance     #468      +/-   ##
===================================================
+ Coverage            87.91%   87.92%   +0.01%     
===================================================
  Files                  195      195              
  Lines                13686    13698      +12     
===================================================
+ Hits                 12032    12044      +12     
  Misses                1341     1341              
  Partials               313      313
Impacted Files Coverage Δ
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.42% <100%> (+0.01%) ⬆️
Libplanet/Blockchain/BlockChain.cs 94.51% <100%> (+0.01%) ⬆️
Libplanet/Net/Swarm.cs 78.97% <0%> (ø) ⬆️
Libplanet.Tests/Net/SwarmTest.cs 92.44% <0%> (ø) ⬆️

@earlbread earlbread force-pushed the earlbread:fix-find-branch branch from 8bbd786 to 0dc2885 Aug 27, 2019

@earlbread earlbread changed the base branch from master to 0.5-maintenance Aug 27, 2019

@earlbread

This comment has been minimized.

Copy link
Member Author

commented Aug 27, 2019

I added changelog and changed the base branch to 0.5-maintenance.

@earlbread earlbread requested review from dahlia and longfin Aug 27, 2019

@earlbread earlbread dismissed stale reviews from moreal, longfin, and dahlia via e394678 Aug 28, 2019

@earlbread earlbread force-pushed the earlbread:fix-find-branch branch from 0dc2885 to e394678 Aug 28, 2019

@earlbread

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

I changed block.Equals(this[block.Index]) to hash.Equals(Store.IndexBlockHash(Id.ToString(), block.Index))) to avoid ArgumentOutOfRangeException. Please take a look.

@earlbread earlbread requested review from dahlia, longfin and moreal Aug 28, 2019

@moreal
moreal approved these changes Aug 28, 2019
@dahlia
dahlia approved these changes Aug 28, 2019

@earlbread earlbread merged commit cda4803 into planetarium:0.5-maintenance Aug 28, 2019

17 of 18 checks passed

planetarium.libplanet (macOS_Mono) macOS_Mono failed
Details
WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 100% of diff hit (target 87.91%)
Details
codecov/project 87.92% (+0.01%) compared to e8f8d39
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190828.1 had test failures
Details
planetarium.libplanet (Linux_Mono) Linux_Mono succeeded
Details
planetarium.libplanet (Linux_NETCore) Linux_NETCore succeeded
Details
planetarium.libplanet (Windows_Mono) Windows_Mono succeeded
Details
planetarium.libplanet (Windows_NETCore) Windows_NETCore succeeded
Details
planetarium.libplanet (Windows_NETCore_Benchmark) Windows_NETCore_Benchmark succeeded
Details
planetarium.libplanet (Windows_NETCore_coverage) Windows_NETCore_coverage succeeded
Details
planetarium.libplanet (Windows_NETFramework) Windows_NETFramework succeeded
Details
planetarium.libplanet (macOS_Mono) macOS_Mono succeeded
Details
planetarium.libplanet (macOS_NETCore) macOS_NETCore succeeded
Details
planetarium.libplanet (macOS_Unity) macOS_Unity succeeded
Details

@earlbread earlbread deleted the earlbread:fix-find-branch branch Aug 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.