File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -347,12 +347,12 @@ impl<Pk: MiniscriptKey> Descriptor<Pk> {
347
347
) ]
348
348
pub fn max_satisfaction_weight ( & self ) -> Result < usize , Error > {
349
349
let weight = match * self {
350
- Descriptor :: Bare ( ref bare) => bare. max_satisfaction_weight ( ) ?,
351
- Descriptor :: Pkh ( ref pkh) => pkh. max_satisfaction_weight ( ) ,
352
- Descriptor :: Wpkh ( ref wpkh) => wpkh. max_satisfaction_weight ( ) ,
353
- Descriptor :: Wsh ( ref wsh) => wsh. max_satisfaction_weight ( ) ?,
354
- Descriptor :: Sh ( ref sh) => sh. max_satisfaction_weight ( ) ?,
355
- Descriptor :: Tr ( ref tr) => tr. max_satisfaction_weight ( ) ?,
350
+ Descriptor :: Bare ( ref bare) => bare. max_weight_to_satisfy ( ) ?,
351
+ Descriptor :: Pkh ( ref pkh) => pkh. max_weight_to_satisfy ( ) ,
352
+ Descriptor :: Wpkh ( ref wpkh) => wpkh. max_weight_to_satisfy ( ) ,
353
+ Descriptor :: Wsh ( ref wsh) => wsh. max_weight_to_satisfy ( ) ?,
354
+ Descriptor :: Sh ( ref sh) => sh. max_weight_to_satisfy ( ) ?,
355
+ Descriptor :: Tr ( ref tr) => tr. max_weight_to_satisfy ( ) ?,
356
356
} ;
357
357
Ok ( weight)
358
358
}
Original file line number Diff line number Diff line change @@ -239,15 +239,15 @@ impl<Pk: MiniscriptKey> Sh<Pk> {
239
239
pub fn max_satisfaction_weight ( & self ) -> Result < usize , Error > {
240
240
Ok ( match self . inner {
241
241
// add weighted script sig, len byte stays the same
242
- ShInner :: Wsh ( ref wsh) => 4 * 35 + wsh. max_satisfaction_weight ( ) ?,
242
+ ShInner :: Wsh ( ref wsh) => 4 * 35 + wsh. max_weight_to_satisfy ( ) ?,
243
243
ShInner :: SortedMulti ( ref smv) => {
244
244
let ss = smv. script_size ( ) ;
245
245
let ps = push_opcode_size ( ss) ;
246
246
let scriptsig_len = ps + ss + smv. max_satisfaction_size ( ) ;
247
247
4 * ( varint_len ( scriptsig_len) + scriptsig_len)
248
248
}
249
249
// add weighted script sig, len byte stays the same
250
- ShInner :: Wpkh ( ref wpkh) => 4 * 23 + wpkh. max_satisfaction_weight ( ) ,
250
+ ShInner :: Wpkh ( ref wpkh) => 4 * 23 + wpkh. max_weight_to_satisfy ( ) ,
251
251
ShInner :: Ms ( ref ms) => {
252
252
let ss = ms. script_size ( ) ;
253
253
let ps = push_opcode_size ( ss) ;
You can’t perform that action at this time.
0 commit comments