Skip to content

Commit 3e97ff9

Browse files
committed
gui, psbt: Use SIGHASH_DEFAULT when signing PSBTs
SIGHASH_DEFAULT should be used to indicate SIGHASH_DEFAULT for taproot inputs, and SIGHASH_ALL for all other input types. This avoids adding an unnecessary byte to the end of all Taproot signatures added to PSBTs signed in the GUI.
1 parent 41a2ce9 commit 3e97ff9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qt/psbtoperationsdialog.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void PSBTOperationsDialog::signTransaction()
8383

8484
WalletModel::UnlockContext ctx(m_wallet_model->requestUnlock());
8585

86-
const auto err{m_wallet_model->wallet().fillPSBT(SIGHASH_ALL, /*sign=*/true, /*bip32derivs=*/true, &n_signed, m_transaction_data, complete)};
86+
const auto err{m_wallet_model->wallet().fillPSBT(SIGHASH_DEFAULT, /*sign=*/true, /*bip32derivs=*/true, &n_signed, m_transaction_data, complete)};
8787

8888
if (err) {
8989
showStatus(tr("Failed to sign transaction: %1")

0 commit comments

Comments
 (0)