-
Notifications
You must be signed in to change notification settings - Fork 154
Description
Currently max_satisfaction_weight
is deprecated only for:
- Generic
Descriptor
rust-miniscript/src/descriptor/mod.rs
Lines 344 to 346 in 469c113
#[deprecated(note = "use max_weight_to_satisfy instead")] #[allow(deprecated)] pub fn max_satisfaction_weight(&self) -> Result<usize, Error> { Bare
rust-miniscript/src/descriptor/bare.rs
Lines 86 to 87 in 469c113
#[deprecated(note = "use max_weight_to_satisfy instead")] pub fn max_satisfaction_weight(&self) -> Result<usize, Error> { Sh
rust-miniscript/src/descriptor/sh.rs
Lines 235 to 237 in 469c113
#[deprecated(note = "use max_weight_to_satisfy instead")] #[allow(deprecated)] pub fn max_satisfaction_weight(&self) -> Result<usize, Error> { Wsh
rust-miniscript/src/descriptor/segwitv0.rs
Lines 104 to 105 in 469c113
#[deprecated(note = "use max_weight_to_satisfy instead")] pub fn max_satisfaction_weight(&self) -> Result<usize, Error> { tr
rust-miniscript/src/descriptor/tr.rs
Lines 312 to 313 in 469c113
#[deprecated(note = "use max_weight_to_satisfy instead")] pub fn max_satisfaction_weight(&self) -> Result<usize, Error> {
but not for:
Pkh
:
rust-miniscript/src/descriptor/bare.rs
Lines 250 to 256 in 469c113
/// Computes an upper bound on the weight of a satisfying witness to the /// transaction. /// /// Assumes all ec-signatures are 73 bytes, including push opcode and /// sighash suffix. Includes the weight of the VarInts encoding the /// scriptSig and witness stack length. pub fn max_satisfaction_weight(&self) -> usize { 4 * (1 + 73 + BareCtx::pk_len(&self.pk)) } Wpkh
:
rust-miniscript/src/descriptor/segwitv0.rs
Lines 357 to 363 in 469c113
/// Computes an upper bound on the weight of a satisfying witness to the /// transaction. /// /// Assumes all ec-signatures are 73 bytes, including push opcode and /// sighash suffix. Includes the weight of the VarInts encoding the /// scriptSig and witness stack length. pub fn max_satisfaction_weight(&self) -> usize { 4 + 1 + 73 + Segwitv0::pk_len(&self.pk) }
Is this the intended behavior?
If not, I can easily (and gladly) open a PR to add deprecation notices to Pkh
and Wpkh
.
Cc @evanlinjin who originally deprecated these.
Related bitcoindevkit/bdk#1036