mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
rpc: bumpfee signer support
This commit is contained in:
@@ -1010,7 +1010,7 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
||||
std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request);
|
||||
if (!pwallet) return NullUniValue;
|
||||
|
||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && !want_psbt) {
|
||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_DISABLE_PRIVATE_KEYS) && !pwallet->IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER) && !want_psbt) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "bumpfee is not available with wallets that have private keys disabled. Use psbtbumpfee instead.");
|
||||
}
|
||||
|
||||
@@ -1088,6 +1088,9 @@ static RPCHelpMan bumpfee_helper(std::string method_name)
|
||||
// For psbtbumpfee, return the base64-encoded unsigned PSBT of the new transaction.
|
||||
if (!want_psbt) {
|
||||
if (!feebumper::SignTransaction(*pwallet, mtx)) {
|
||||
if (pwallet->IsWalletFlagSet(WALLET_FLAG_EXTERNAL_SIGNER)) {
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Transaction incomplete. Try psbtbumpfee instead.");
|
||||
}
|
||||
throw JSONRPCError(RPC_WALLET_ERROR, "Can't sign transaction.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user