-
Notifications
You must be signed in to change notification settings - Fork 228
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
feat: use epoch as the basic maturity unit #1646
Conversation
86db8d6
to
e1799c2
Compare
@nervos-bot-user bors r+ |
@nervos-bot-user bors r- |
1 similar comment
@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; |
There was a problem hiding this comment.
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.
There was a problem hiding this 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:
ckb/verification/src/transaction_verifier.rs
Lines 472 to 479 in 9e52959
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)?; | |
} | |
} |
bors r=doitian,keroro520,u2 |
Build succeeded
|
No description provided.