From f9650e18ea6edb41c0136cc2ec3c7e0aba1bf83a Mon Sep 17 00:00:00 2001 From: Matthew Zipkin Date: Tue, 16 Apr 2024 15:34:24 -0400 Subject: [PATCH] rbf: remove unecessary newline at end of error string --- src/policy/rbf.cpp | 2 +- test/functional/mempool_package_rbf.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/policy/rbf.cpp b/src/policy/rbf.cpp index b634dea561..bc76361fba 100644 --- a/src/policy/rbf.cpp +++ b/src/policy/rbf.cpp @@ -71,7 +71,7 @@ std::optional GetEntriesForConflicts(const CTransaction& tx, // descendants (i.e. if multiple conflicts share a descendant, it will be counted multiple // times), but we just want to be conservative to avoid doing too much work. if (nConflictingCount > MAX_REPLACEMENT_CANDIDATES) { - return strprintf("rejecting replacement %s; too many potential replacements (%d > %d)\n", + return strprintf("rejecting replacement %s; too many potential replacements (%d > %d)", txid.ToString(), nConflictingCount, MAX_REPLACEMENT_CANDIDATES); diff --git a/test/functional/mempool_package_rbf.py b/test/functional/mempool_package_rbf.py index 7c0947a33d..4dc6f8fe36 100755 --- a/test/functional/mempool_package_rbf.py +++ b/test/functional/mempool_package_rbf.py @@ -219,7 +219,7 @@ class PackageRBFTest(BitcoinTestFramework): package_child = self.wallet.create_self_transfer(fee_rate=child_feerate, utxo_to_spend=package_parent["new_utxos"][0]) pkg_results = node.submitpackage([package_parent["hex"], package_child["hex"]], maxfeerate=0) - assert_equal(f"package RBF failed: too many potential replacements, rejecting replacement {package_child['tx'].rehash()}; too many potential replacements (102 > 100)\n", pkg_results["package_msg"]) + assert_equal(f"package RBF failed: too many potential replacements, rejecting replacement {package_child['tx'].rehash()}; too many potential replacements (102 > 100)", pkg_results["package_msg"]) self.assert_mempool_contents(expected=expected_txns) # Make singleton tx to conflict with in next batch @@ -234,7 +234,7 @@ class PackageRBFTest(BitcoinTestFramework): package_parent = self.wallet.create_self_transfer_multi(utxos_to_spend=double_spending_coins, fee_per_output=parent_fee_per_conflict) package_child = self.wallet.create_self_transfer(fee_rate=child_feerate, utxo_to_spend=package_parent["new_utxos"][0]) pkg_results = node.submitpackage([package_parent["hex"], package_child["hex"]], maxfeerate=0) - assert_equal(f"package RBF failed: too many potential replacements, rejecting replacement {package_child['tx'].rehash()}; too many potential replacements (101 > 100)\n", pkg_results["package_msg"]) + assert_equal(f"package RBF failed: too many potential replacements, rejecting replacement {package_child['tx'].rehash()}; too many potential replacements (101 > 100)", pkg_results["package_msg"]) self.assert_mempool_contents(expected=expected_txns) # Finally, evict MAX_REPLACEMENT_CANDIDATES