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

Remove `id` from BlockChain<T> constructor #332

Conversation

Projects
None yet
3 participants
@longfin
Copy link
Member

commented Jul 4, 2019

This PR resolves #279 by removing the id parameter from BlockChain<T> constructor. it also made BlockChain<T>.Id to be automatically determined by chain height.

Show resolved Hide resolved CHANGES.md Outdated
@codecov

This comment has been minimized.

Copy link

commented Jul 4, 2019

Codecov Report

Merging #332 into master will increase coverage by 0.09%.
The diff coverage is 97.14%.

@@            Coverage Diff             @@
##           master     #332      +/-   ##
==========================================
+ Coverage   87.56%   87.66%   +0.09%     
==========================================
  Files         189      189              
  Lines       12749    12777      +28     
==========================================
+ Hits        11164    11201      +37     
+ Misses       1335     1325      -10     
- Partials      250      251       +1
Impacted Files Coverage Δ
Libplanet/Net/Swarm.cs 77% <100%> (+0.12%) ⬆️
Libplanet.Tests/Blockchain/BlockChainTest.cs 98.64% <100%> (+0.03%) ⬆️
Libplanet/Blockchain/BlockChain.cs 95.58% <92.85%> (-0.11%) ⬇️
Libplanet.Tests/Net/SwarmTest.cs 92.38% <0%> (+1.04%) ⬆️

@longfin longfin force-pushed the longfin:feature/remove-chain-id-from-blockchain-constructor branch 5 times, most recently from 4f56064 to f22eb73 Jul 4, 2019

@longfin longfin marked this pull request as ready for review Jul 5, 2019

@longfin longfin requested review from earlbread and dahlia Jul 5, 2019

@longfin longfin force-pushed the longfin:feature/remove-chain-id-from-blockchain-constructor branch from f22eb73 to 1c71797 Jul 5, 2019

@longfin longfin force-pushed the longfin:feature/remove-chain-id-from-blockchain-constructor branch from 1c71797 to 94dea55 Jul 5, 2019

@longfin

This comment has been minimized.

Copy link
Member Author

commented Jul 5, 2019

I've renamed BlockChain<T>.GetBestChain() to BlockChain<T>.GetCanonicalChain().

@longfin longfin requested a review from earlbread Jul 5, 2019

@dahlia

dahlia approved these changes Jul 5, 2019

Copy link
Member

left a comment

It would be great if we can hide the BlockChain<T>.Id property at all in the future.

@longfin longfin merged commit c598ac5 into planetarium:master Jul 5, 2019

16 checks passed

WIP Ready for review
Details
changelog This contains self-describing changelog.
Details
codecov/patch 97.14% of diff hit (target 87.56%)
Details
codecov/project 87.66% (+0.09%) compared to 6f577c2
Details
docs Libplanet docs generated by DocFX
Details
license/cla Contributor License Agreement is signed.
Details
planetarium.libplanet Build #20190705.5 succeeded
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_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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.