Merge rust-bitcoin/rust-bitcoin#2687: Allow deprecated Params field

6e84548b1f Allow deprecated Params field (Tobin C. Harding)

Pull request description:

  I'm not sure why I haven't see this before during the whole test cycle but while running `cargo kani --only-codegen` we get a bunch of warnings of form:

    warning: use of deprecated field `consensus::params::Params::pow_limit`

  We deprecated the `pow_limit` field but still set it (obviously) in const structs - just shoosh the warning.

  Found while investigating the current kani CI failures.

ACKs for top commit:
  sanket1729:
    utACK 6e84548b1f

Tree-SHA512: b3fe9108e6098bdca824785caf1b5ce5f89c415e014c6380302f3de16421083fd9b0f01f1559466e2a3a57da93cd7e14a2c3e59ef5c8fdd45762ebeeeeffeea0
This commit is contained in:
Andrew Poelstra 2024-04-17 11:40:53 +00:00
commit 4a73987888
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 1 additions and 0 deletions

View File

@ -71,6 +71,7 @@ pub static SIGNET: Params = Params::SIGNET;
/// The regtest parameters. /// The regtest parameters.
pub static REGTEST: Params = Params::REGTEST; pub static REGTEST: Params = Params::REGTEST;
#[allow(deprecated)] // For `pow_limit`.
impl Params { impl Params {
/// The mainnet parameters (alias for `Params::MAINNET`). /// The mainnet parameters (alias for `Params::MAINNET`).
pub const BITCOIN: Params = Params::MAINNET; pub const BITCOIN: Params = Params::MAINNET;