File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -337,8 +337,26 @@ where
337337 has_errored : false ,
338338 }
339339 }
340- & Descriptor :: WshSortedMulti ( _) | & Descriptor :: ShWshSortedMulti ( _) => unimplemented ! ( ) ,
341- & Descriptor :: ShSortedMulti ( _) => unimplemented ! ( ) ,
340+ // We can leave this as unimplemented because this is supposed to be used to
341+ // Descriptor::from_txin_and_witness which outputs Stack required for the
342+ // constructor of this function.
343+ // Currently, there is no other way in the library to produce stack arg required
344+ // by the function and hence it is safe to assume that user would use the same
345+ // descriptor. To trigger the panic, the user would have to create it's own
346+ // descriptor, use the stack obtained from from_txin_and_witness ignoring the
347+ // other descrpitor output of the function.
348+ // In future, we can remove this by adding another iterator to this if there is
349+ // a usecase of this.
350+ & Descriptor :: WshSortedMulti ( _) | & Descriptor :: ShWshSortedMulti ( _) => unimplemented ! (
351+ "This API is supposed to be used with from_txin_and_witness \\
352+ which cannot output a sorted multi descriptor and thus this code is \\
353+ currently unimplemented."
354+ ) ,
355+ & Descriptor :: ShSortedMulti ( _) => unimplemented ! (
356+ "This API is supposed to be used with from_txin_and_witness \\
357+ which cannot output a sorted multi descriptor and thus this code is \\
358+ currently unimplemented."
359+ ) ,
342360 }
343361 }
344362}
You can’t perform that action at this time.
0 commit comments