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

longfin
Copy link
Member

@longfin longfin 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.

CHANGES.md Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot 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 feature/remove-chain-id-from-blockchain-constructor branch 5 times, most recently from 4f56064 to f22eb73 Compare July 5, 2019 04:32
@longfin longfin marked this pull request as ready for review July 5, 2019 04:33
@longfin longfin requested review from earlbread and dahlia July 5, 2019 04:33
@longfin longfin force-pushed the feature/remove-chain-id-from-blockchain-constructor branch from f22eb73 to 1c71797 Compare July 5, 2019 04:36
earlbread
earlbread previously approved these changes Jul 5, 2019
@longfin longfin force-pushed the feature/remove-chain-id-from-blockchain-constructor branch from 1c71797 to 94dea55 Compare July 5, 2019 06:06
@longfin
Copy link
Member Author

longfin commented Jul 5, 2019

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

@longfin longfin requested a review from earlbread July 5, 2019 07:04
Copy link
Contributor

@dahlia dahlia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
limebell pushed a commit to limebell/libplanet that referenced this pull request Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hide the concept of “chain IDs”
3 participants