File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1195,6 +1195,22 @@ fn test_create_tx_custom_sighash() {
1195
1195
) ;
1196
1196
}
1197
1197
1198
+ #[ test]
1199
+ fn test_legacy_create_tx_custom_sighash ( ) {
1200
+ let ( mut wallet, _) = get_funded_wallet_single ( get_test_pkh ( ) ) ;
1201
+ let addr = wallet. next_unused_address ( KeychainKind :: External ) ;
1202
+ let mut builder = wallet. build_tx ( ) ;
1203
+ builder
1204
+ . add_recipient ( addr. script_pubkey ( ) , Amount :: from_sat ( 30_000 ) )
1205
+ . sighash ( EcdsaSighashType :: Single . into ( ) ) ;
1206
+ let psbt = builder. finish ( ) . unwrap ( ) ;
1207
+
1208
+ assert_eq ! (
1209
+ psbt. inputs[ 0 ] . sighash_type,
1210
+ Some ( EcdsaSighashType :: Single . into( ) )
1211
+ ) ;
1212
+ }
1213
+
1198
1214
#[ test]
1199
1215
fn test_create_tx_input_hd_keypaths ( ) {
1200
1216
use bitcoin:: bip32:: { DerivationPath , Fingerprint } ;
You can’t perform that action at this time.
0 commit comments