Extract aggregate_work_info function#1908
Merged
remagpie merged 1 commit intoCodeChain-io:masterfrom Dec 9, 2019
Merged
Conversation
sgkim126
reviewed
Dec 4, 2019
|
|
||
| let start_of_the_current_term = { | ||
| let end_of_the_last_term = | ||
| chain.last_term_finished_block_num((start_of_the_next_term_header.number() - 2).into()).unwrap(); |
Contributor
Author
There was a problem hiding this comment.
Yes, it's right.
End of the current term = block@(Start of the next term - 1)
End of the last term = block@((End of the current term - 1).metadata.lastTermFinished)
It becomes a bit different if the current term has only one block, but surprisingly, the final formula remains the same.
5ca3333 to
6b4ee35
Compare
6b4ee35 to
89dc8a3
Compare
Contributor
Author
|
I rebased the PR to @foriequal0 's refactoring branch. |
Contributor
|
@foriequal0 It looks good to me, but would you double-check? |
foriequal0
previously approved these changes
Dec 6, 2019
89dc8a3 to
cf7a45a
Compare
foriequal0
approved these changes
Dec 9, 2019
sgkim126
approved these changes
Dec 9, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends: #1916