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

Added module with consensus parameters #93

Merged
merged 1 commit into from Jun 23, 2018

Conversation

popzxc
Copy link
Contributor

@popzxc popzxc commented Jun 6, 2018

This new module contains a set of constants associated with different chains.

It may be very useful for client-side validation/verification of blocks.

pub bip34_height: u32,
/// Block height at which BIP65 becomes active.
pub bip65_height: u32,
/// Block height at which BIP65 becomes active.
Copy link
Contributor

Choose a reason for hiding this comment

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

you mean BIP66

}
}

/// Calculates amount of blocks between difficulty adjustments.
Copy link
Contributor

Choose a reason for hiding this comment

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

*the number of blocks

@@ -52,6 +53,13 @@ pub fn magic(network: Network) -> u32 {
}
}

/// Lowest possible difficulty for Mainnet.
Copy link
Contributor

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?

@popzxc
Copy link
Contributor Author

popzxc commented Jun 13, 2018

Done.

@tamasblummer
Copy link
Contributor

@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)

@apoelstra
Copy link
Member

@tamasblummer I think it's fine as-is since we're copying constants from Core that people migth expect to be there.

@tamasblummer
Copy link
Contributor

@apoelstra this is pending on #99

@tamasblummer tamasblummer merged commit 2ff5f8e into rust-bitcoin:master Jun 23, 2018
@popzxc popzxc deleted the add-consensus-params branch May 20, 2021 18:18
Davidson-Souza pushed a commit to Davidson-Souza/rust-bitcoin that referenced this pull request Jul 12, 2023
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