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 protocol_affective_at_height from micro candidate create #2837

Merged
merged 1 commit into from Oct 7, 2019

Conversation

jur0
Copy link
Contributor

@jur0 jur0 commented Oct 3, 2019

PT-168825403

Preparatory PR for fork signalling.

@jur0 jur0 added the status/wip Issues or PRs which are not ready for review or further actions label Oct 3, 2019
@jur0 jur0 self-assigned this Oct 3, 2019
@jur0 jur0 removed the status/wip Issues or PRs which are not ready for review or further actions label Oct 4, 2019
@jur0 jur0 marked this pull request as ready for review October 4, 2019 10:42
Comment on lines -106 to -113
%% Assert correctness of last block protocol version, as minimum
%% sanity check on previous block and state (mainly for potential
%% stale state persisted in DB and for development testing).
ExpectedPrevBlockVersion =
aec_hard_forks:protocol_effective_at_height(PrevBlockHeight),
{ExpectedPrevBlockVersion, _} = {aec_blocks:version(PrevBlock),
{expected, ExpectedPrevBlockVersion}},

Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this sanity check stay there in some new form?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All the blocks are added via the conductor process which makes sure each added block is valid and connected to the genesis. So we can rely on the previous key block to be valid and so having the right protocol version.

@jur0 jur0 merged commit c5bc545 into master Oct 7, 2019
@jur0 jur0 deleted the PT-168825403-refactor-micro-block-candidate-creation branch October 7, 2019 09:49
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.

None yet

3 participants