Merge rust-bitcoin/rust-bitcoin#2625: Put back in deprecated dust_value

c17db32df3 Pub back in deprecated dust_value (Tobin C. Harding)

Pull request description:

  When we renamed `dust_value` to `minimal_non_dust` we forgot to keep the original and deprecated it, doing so assists with the upgrade path.

  Put back in deprecated `dust_value`, linking to the rename.

  Renamed in #2255, found while testing upgrade of downstream software.

ACKs for top commit:
  tcharding:
    > ACK [c17db32](c17db32df3) I _think_ this matches the behavior of the old version
  apoelstra:
    ACK c17db32df3 I *think* this matches the behavior of the old version
  sanket1729:
    ACK c17db32df3

Tree-SHA512: 28e1bd2e1a0fd13c78c70ad2667b72b3bf649c293201b79c86c00f09d0126389ebaeb430b8dd32aeeec3d60cbd8761ae949f5784a5ea7756b1b9ae77ec96ce61
This commit is contained in:
Andrew Poelstra 2024-03-23 14:40:44 +00:00
commit 26248b28ac
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
1 changed files with 6 additions and 0 deletions

View File

@ -395,6 +395,12 @@ impl Script {
}
}
/// Returns the minimum value an output with this script should have in order to be
/// broadcastable on todays Bitcoin network.
#[deprecated(since = "0.32.0", note = "use minimal_non_dust and friends")]
pub fn dust_value(&self) -> crate::Amount { self.minimal_non_dust() }
/// Returns the minimum value an output with this script should have in order to be
/// broadcastable on today's Bitcoin network.
///