Skip to content

Commit

Permalink
Merge rust-bitcoin#2695: Allow deprecated Params field
Browse files Browse the repository at this point in the history
0373f80 Allow deprecated Params field (Tobin C. Harding)

Pull request description:

  This is a port of rust-bitcoin#2687 created using `git cherry-pick 6e84548`.

  ------

  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.

ACKs for top commit:
  apoelstra:
    ACK 0373f80

Tree-SHA512: d4c3b6a076bf56c3f578a5c752d010c43bc18596f6df2839bf0dbcacdb3237316076c680e712843a7e937f757df85b6dd895414bdba49c9ac3c5e801874e3da6
  • Loading branch information
apoelstra committed Apr 18, 2024
2 parents 5134756 + 0373f80 commit b3ec4b3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions bitcoin/src/consensus/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub static SIGNET: Params = Params::SIGNET;
/// The regtest parameters.
pub static REGTEST: Params = Params::REGTEST;

#[allow(deprecated)] // For `pow_limit`.
impl Params {
/// The mainnet parameters (alias for `Params::MAINNET`).
pub const BITCOIN: Params = Params::MAINNET;
Expand Down

0 comments on commit b3ec4b3

Please sign in to comment.