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

cleanup HeaderVersion::default() #3149

Merged
merged 3 commits into from
Dec 2, 2019

Conversation

antiochp
Copy link
Member

@antiochp antiochp commented Nov 29, 2019

HF2 changes removed our usage of a "default" header version (#3136).

The concept of a "default" header version is a little ambiguous as the valid version is dependent on block height. So this PR just makes it explicit everywhere and gets rid of the Default impl.

We can now simply set the version to 0 on a default block, as we set it later to the required valid version when we set the height.

Edit: We actually use the "default" header version when building the mainnet genesis hash on startup (same for floonet). So leaving this as 1 in the block header default constructor.

@antiochp antiochp force-pushed the default_header_version branch from 10fcd47 to 4eec76e Compare November 29, 2019 14:49
@antiochp antiochp changed the title header version now explicit, no "default" version cleanup HeaderVersion::default() Nov 29, 2019
@antiochp antiochp force-pushed the default_header_version branch from c914050 to 2b4adda Compare December 2, 2019 11:49
@antiochp antiochp merged commit 52ea906 into mimblewimble:master Dec 2, 2019
@antiochp antiochp deleted the default_header_version branch December 2, 2019 12:35
@antiochp antiochp added this to the 3.0.0 milestone Dec 11, 2019
@antiochp antiochp mentioned this pull request Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants