mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge bitcoin/bitcoin#21576: rpc, gui: bumpfee signer support
2c07cfacd1gui: bumpfee signer support (Sjors Provoost)7e02a33297rpc: bumpfee signer support (Sjors Provoost)304ece9945rpc: document bools in FillPSBT() calls (Sjors Provoost) Pull request description: The `bumpfee` RPC call and GUI fee bump interface now work with an external signer. ACKs for top commit: achow101: ACK2c07cfacd1furszy: code review ACK2c07cfacjarolrod: tACK2c07cfaTree-SHA512: 0c7b931f76fac67c9e33b9b935f29af6f69ac67a5ffcc586ed2f1676feac427735b1d971723b29ef332bb6fb5762949598ebbf728587e8f0ded95a9bfbb3e7a4
This commit is contained in:
@@ -522,7 +522,9 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
|
||||
questionString.append(tr("Warning: This may pay the additional fee by reducing change outputs or adding inputs, when necessary. It may add a new change output if one does not already exist. These changes may potentially leak privacy."));
|
||||
}
|
||||
|
||||
auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, !m_wallet->privateKeysDisabled(), getOptionsModel()->getEnablePSBTControls(), nullptr);
|
||||
const bool enable_send{!wallet().privateKeysDisabled() || wallet().hasExternalSigner()};
|
||||
const bool always_show_unsigned{getOptionsModel()->getEnablePSBTControls()};
|
||||
auto confirmationDialog = new SendConfirmationDialog(tr("Confirm fee bump"), questionString, "", "", SEND_CONFIRM_DELAY, enable_send, always_show_unsigned, nullptr);
|
||||
confirmationDialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
// TODO: Replace QDialog::exec() with safer QDialog::show().
|
||||
const auto retval = static_cast<QMessageBox::StandardButton>(confirmationDialog->exec());
|
||||
@@ -540,6 +542,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
|
||||
|
||||
// Short-circuit if we are returning a bumped transaction PSBT to clipboard
|
||||
if (retval == QMessageBox::Save) {
|
||||
// "Create Unsigned" clicked
|
||||
PartiallySignedTransaction psbtx(mtx);
|
||||
bool complete = false;
|
||||
const TransactionError err = wallet().fillPSBT(SIGHASH_ALL, /*sign=*/false, /*bip32derivs=*/true, nullptr, psbtx, complete);
|
||||
@@ -555,7 +558,7 @@ bool WalletModel::bumpFee(uint256 hash, uint256& new_hash)
|
||||
return true;
|
||||
}
|
||||
|
||||
assert(!m_wallet->privateKeysDisabled());
|
||||
assert(!m_wallet->privateKeysDisabled() || wallet().hasExternalSigner());
|
||||
|
||||
// sign bumped transaction
|
||||
if (!m_wallet->signBumpTransaction(mtx)) {
|
||||
|
||||
Reference in New Issue
Block a user