We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
test_legacy_create_tx_custom_sighash()
1 parent 436e09b commit d99a583Copy full SHA for d99a583
wallet/tests/wallet.rs
@@ -1178,6 +1178,22 @@ fn test_create_tx_custom_sighash() {
1178
);
1179
}
1180
1181
+#[test]
1182
+fn test_legacy_create_tx_custom_sighash() {
1183
+ let (mut wallet, _) = get_funded_wallet(get_test_pkh(), None);
1184
+ let addr = wallet.next_unused_address(KeychainKind::External);
1185
+ let mut builder = wallet.build_tx();
1186
+ builder
1187
+ .add_recipient(addr.script_pubkey(), Amount::from_sat(30_000))
1188
+ .sighash(EcdsaSighashType::Single.into());
1189
+ let psbt = builder.finish().unwrap();
1190
+
1191
+ assert_eq!(
1192
+ psbt.inputs[0].sighash_type,
1193
+ Some(EcdsaSighashType::Single.into())
1194
+ );
1195
+}
1196
1197
#[test]
1198
fn test_create_tx_input_hd_keypaths() {
1199
use bitcoin::bip32::{DerivationPath, Fingerprint};
0 commit comments