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

feat: use epoch as the basic maturity unit #1646

Merged
merged 2 commits into from
Sep 26, 2019

Conversation

yangby-cryptape
Copy link
Collaborator

No description provided.

@yangby-cryptape yangby-cryptape requested a review from a team September 25, 2019 13:15
@yangby-cryptape yangby-cryptape added the s:waiting-on-reviewers Status: Waiting for Review label Sep 25, 2019
@doitian doitian added this to 👀 Awaiting review in CKB - Pull Requests Sep 26, 2019
@doitian doitian moved this from 👀 Awaiting review to 🔴 High priority in CKB - Pull Requests Sep 26, 2019
CKB - Pull Requests automation moved this from 🔴 High priority to ✅ Reviewer approved Sep 26, 2019
@keroro520
Copy link
Contributor

@nervos-bot-user bors r+

@keroro520
Copy link
Contributor

keroro520 commented Sep 26, 2019

@nervos-bot-user bors r-

1 similar comment
@keroro520
Copy link
Contributor

@nervos-bot-user bors r-

Box::new(move |spec_config: &mut ChainSpec| {
spec_config.params.cellbase_maturity = cellbase_maturity;
spec_config.params.cellbase_maturity = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove code which test the cellbase maturity in ValidSince spec, since the block number can't be estimated accurately.

Copy link
Collaborator Author

@yangby-cryptape yangby-cryptape left a comment

Choose a reason for hiding this comment

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

The code which compare two EpochWithFraction is copied from:

Some(SinceMetric::EpochNumberWithFraction(epoch_number_with_fraction)) => {
let a = self.epoch_number_with_fraction.to_rational();
let b =
info.block_epoch.to_rational() + epoch_number_with_fraction.to_rational();
if a < b {
Err(TransactionError::Immature)?;
}
}

@yangby-cryptape
Copy link
Collaborator Author

bors r=doitian,keroro520,u2

@nervos-bot nervos-bot bot added the s:ready-to-merge Status: Waiting to be merged. label Sep 26, 2019
bors bot added a commit that referenced this pull request Sep 26, 2019
1646: feat: use epoch as the basic maturity unit r=doitian,keroro520,u2 a=yangby-cryptape



Co-authored-by: Boyu Yang <yangby@cryptape.com>
@bors
Copy link
Contributor

bors bot commented Sep 26, 2019

Build succeeded

  • continuous-integration/travis-ci/push

@bors bors bot merged commit 0419a49 into nervosnetwork:develop Sep 26, 2019
CKB - Pull Requests automation moved this from ✅ Reviewer approved to Done Sep 26, 2019
@yangby-cryptape yangby-cryptape deleted the pr/epoch-maturity branch April 1, 2020 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:ready-to-merge Status: Waiting to be merged. s:waiting-on-reviewers Status: Waiting for Review
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants