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
Added module with consensus parameters #93
Conversation
src/network/consensus_params.rs
Outdated
pub bip34_height: u32, | ||
/// Block height at which BIP65 becomes active. | ||
pub bip65_height: u32, | ||
/// Block height at which BIP65 becomes active. |
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.
you mean BIP66
src/network/consensus_params.rs
Outdated
} | ||
} | ||
|
||
/// Calculates amount of blocks between difficulty adjustments. |
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 number of blocks
src/network/constants.rs
Outdated
@@ -52,6 +53,13 @@ pub fn magic(network: Network) -> u32 { | |||
} | |||
} | |||
|
|||
/// Lowest possible difficulty for Mainnet. |
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.
these constants should be in consensus_params and not be global. if they were global then what is the use of collecting them into parameter objects?
4a841fa
to
e0b10ae
Compare
Done. |
@apoelstra I am not sure if soft fork rule miner activation thresholds will ever be used again. Maybe better add simple heights for those BIPs activated that way (e.g. Segwit) |
@tamasblummer I think it's fine as-is since we're copying constants from Core that people migth expect to be there. |
@apoelstra this is pending on #99 |
bump version to 0.12.1
This new module contains a set of constants associated with different chains.
It may be very useful for client-side validation/verification of blocks.