diff --git a/contrib/source-control-tools/autogen-recipes/50-archive-release-notes.sh b/contrib/source-control-tools/autogen-recipes/50-archive-release-notes.sh
index 75a571f5a..90988daa1 100755
--- a/contrib/source-control-tools/autogen-recipes/50-archive-release-notes.sh
+++ b/contrib/source-control-tools/autogen-recipes/50-archive-release-notes.sh
@@ -1,32 +1,34 @@
#!/usr/bin/env bash
export LC_ALL=C.UTF-8
set -euxo pipefail
TOPLEVEL=$(git rev-parse --show-toplevel)
# shellcheck source=../../utils/compare-version.sh
source "${TOPLEVEL}"/contrib/utils/compare-version.sh
RELEASE_NOTES_FILE="${TOPLEVEL}/doc/release-notes.md"
-RELEASE_NOTES_VERSION=$(sed -n "1s/^Bitcoin ABC version \([0-9]\+\.[0-9]\+\.[0-9]\+\).\+$/\1/p" "${RELEASE_NOTES_FILE}")
+# Match the first version number in the first line of the existing release
+# notes. This will fail if no version number is found.
+RELEASE_NOTES_VERSION=$(head -n1 "${RELEASE_NOTES_FILE}" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" | head -n1)
RELEASE_NOTES_ARCHIVE="${TOPLEVEL}/doc/release-notes/release-notes-${RELEASE_NOTES_VERSION}.md"
CURRENT_VERSION=""
get_current_version CURRENT_VERSION
# Compare the versions. We only want to archive the release notes if the
# current version is greater the our release notes version.
if version_less_equal "${CURRENT_VERSION}" "${RELEASE_NOTES_VERSION}"
then
echo "Current version ${CURRENT_VERSION} <= release-notes version ${RELEASE_NOTES_VERSION}, skip the update"
exit 0
fi
# Archive the release notes
cp "${RELEASE_NOTES_FILE}" "${RELEASE_NOTES_ARCHIVE}"
# Generate a fresh blank release notes file for the new version
PROJECT_VERSION="${CURRENT_VERSION}" envsubst < "${TOPLEVEL}/doc/release-notes/release-notes.md.in" > "${RELEASE_NOTES_FILE}"
git add "${RELEASE_NOTES_FILE}" "${RELEASE_NOTES_ARCHIVE}"
diff --git a/doc/release-notes.md b/doc/release-notes.md
index 83b9aed41..dabef54d6 100644
--- a/doc/release-notes.md
+++ b/doc/release-notes.md
@@ -1,7 +1,40 @@
# Bitcoin ABC 0.22.4 Release Notes
Bitcoin ABC version 0.22.4 is now available from:
This release includes the following features and fixes:
+
+Wallet
+------
+
+- The way that output trust was computed has been fixed, which impacts
+ confirmed/unconfirmed balance status and coin selection.
+
+Command-line options
+--------------------
+
+- The `-debug=db` logging category has been renamed to `-debug=walletdb`,
+ to distinguish it from `coindb`. `-debug=db` has been deprecated and will
+ be removed in a next release.
+
+Low-level RPC Changes
+---------------------
+
+- The RPC gettransaction, listtransactions and listsinceblock responses now also
+ includes the height of the block that contains the wallet transaction, if any.
+
+Deprecated or removed RPCs
+--------------------------
+
+- The `getaddressinfo` RPC `labels` field now returns an array of label name
+ strings. Previously, it returned an array of JSON objects containing `name` and
+ `purpose` key/value pairs, which is now deprecated and will be removed in a future
+ release. To re-enable the previous behavior, launch bitcoind with
+ `-deprecatedrpc=labelspurpose`.
+
+Miscellaneous CLI Changes
+-------------------------
+- The `testnet` field in `bitcoin-cli -getinfo` has been renamed to `chain` and
+ now returns the current network name as defined in BIP70 (main, test, regtest).
diff --git a/doc/release-notes/release-notes-.md b/doc/release-notes/release-notes-.md
deleted file mode 100644
index 83b9aed41..000000000
--- a/doc/release-notes/release-notes-.md
+++ /dev/null
@@ -1,7 +0,0 @@
-# Bitcoin ABC 0.22.4 Release Notes
-
-Bitcoin ABC version 0.22.4 is now available from:
-
-
-
-This release includes the following features and fixes: