diff --git a/doc/release-notes.md b/doc/release-notes.md
index 54492ef1c..5d46a6914 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,13 +1,20 @@
# Bitcoin ABC 0.22.9 Release Notes
Bitcoin ABC version 0.22.9 is now available from:
This release includes the following features and fixes:
# Wallet
The `-salvagewallet` startup option has been removed. A new `salvage` command has
been added to the `bitcoin-wallet` tool which performs the salvage operations
that `-salvagewallet` did.
+
+# RPC changes
+
+The `walletcreatefundedpsbt` RPC call will now fail with `Insufficient funds`
+when inputs are manually selected but are not enough to cover the outputs and
+fee. Additional inputs can automatically be added through the new `add_inputs`
+option.
\ No newline at end of file
diff --git a/src/wallet/coincontrol.cpp b/src/wallet/coincontrol.cpp
index a5db5f7b1..83e378fd4 100644
--- a/src/wallet/coincontrol.cpp
+++ b/src/wallet/coincontrol.cpp
@@ -1,23 +1,24 @@
// Copyright (c) 2018 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include
#include
void CCoinControl::SetNull() {
destChange = CNoDestination();
m_change_type.reset();
+ m_add_inputs = true;
fAllowOtherInputs = false;
fAllowWatchOnly = false;
m_avoid_partial_spends =
gArgs.GetBoolArg("-avoidpartialspends", DEFAULT_AVOIDPARTIALSPENDS);
m_avoid_address_reuse = false;
setSelected.clear();
m_feerate.reset();
fOverrideFeeRate = false;
m_confirm_target.reset();
m_min_depth = DEFAULT_MIN_DEPTH;
m_max_depth = DEFAULT_MAX_DEPTH;
}
diff --git a/src/wallet/coincontrol.h b/src/wallet/coincontrol.h
index 54b82e28d..cd7a027e0 100644
--- a/src/wallet/coincontrol.h
+++ b/src/wallet/coincontrol.h
@@ -1,68 +1,70 @@
// Copyright (c) 2011-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_WALLET_COINCONTROL_H
#define BITCOIN_WALLET_COINCONTROL_H
#include
#include
#include