@@ -28,7 +28,7 @@ use bitcoin::blockdata::witness::Witness;
2828use bitcoin:: secp256k1:: { self , Secp256k1 } ;
2929use bitcoin:: util:: key:: XOnlyPublicKey ;
3030use bitcoin:: util:: taproot:: LeafVersion ;
31- use bitcoin:: { self , EcdsaSigHashType , PublicKey , Script } ;
31+ use bitcoin:: { self , PublicKey , Script } ;
3232use descriptor:: DescriptorTrait ;
3333use interpreter;
3434use Descriptor ;
@@ -345,39 +345,6 @@ pub fn finalize_helper<C: secp256k1::Verification>(
345345) -> Result < ( ) , super :: Error > {
346346 sanity_check ( psbt) ?;
347347
348- // Check well-formedness of input data
349- for ( n, input) in psbt. inputs . iter ( ) . enumerate ( ) {
350- // TODO: fix this after https://github.com/rust-bitcoin/rust-bitcoin/issues/838
351- let target_ecdsa_sighash_ty = match input. sighash_type {
352- Some ( psbt_hash_ty) => psbt_hash_ty
353- . ecdsa_hash_ty ( )
354- . map_err ( |e| Error :: InputError ( InputError :: NonStandardSigHashType ( e) , n) ) ?,
355- None => EcdsaSigHashType :: All ,
356- } ;
357- for ( key, ecdsa_sig) in & input. partial_sigs {
358- let flag = bitcoin:: EcdsaSigHashType :: from_u32_standard ( ecdsa_sig. hash_ty as u32 )
359- . map_err ( |_| {
360- super :: Error :: InputError (
361- InputError :: Interpreter ( interpreter:: Error :: NonStandardSigHash (
362- ecdsa_sig. to_vec ( ) ,
363- ) ) ,
364- n,
365- )
366- } ) ?;
367- if target_ecdsa_sighash_ty != flag {
368- return Err ( Error :: InputError (
369- InputError :: WrongSigHashFlag {
370- required : target_ecdsa_sighash_ty,
371- got : flag,
372- pubkey : bitcoin:: PublicKey :: new ( * key) ,
373- } ,
374- n,
375- ) ) ;
376- }
377- // Signatures are well-formed in psbt partial sigs
378- }
379- }
380-
381348 // Actually construct the witnesses
382349 for index in 0 ..psbt. inputs . len ( ) {
383350 let ( witness, script_sig) = {
0 commit comments