nit:
This second test that tx's are not readded at the resubmit timer is dependent on the test above, e.g. consider this diff:
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 93851a8736..8d15b02f37 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -1917,7 +1917,7 @@ void CWallet::ResubmitWalletTransactions(node::TxBroadcast broadcast_method, boo
// Don't attempt to resubmit if the wallet is configured to not broadcast,
// even if forcing.
if (!fBroadcastTransactions) return;
- if (m_private_broadcast) return;
+ // if (m_private_broadcast) return;
int submitted_tx_count = 0;
diff --git a/test/functional/wallet_resendwallettransactions.py b/test/functional/wallet_resendwallettransactions.py
index e4afad1d42..8f1da010e3 100755
--- a/test/functional/wallet_resendwallettransactions.py
+++ b/test/functional/wallet_resendwallettransactions.py
@@ -161,7 +161,8 @@ class ResendWalletTransactionsTest(BitcoinTestFramework):
node1.replace_in_config([("connect=0\n", "")]) # -privatebroadcast refuses -connect
privbcast_args = ["-privatebroadcast", "-onion=127.0.0.1:9", "-persistmempool=0"] # the proxy is never used here
self.restart_node(1, extra_args=privbcast_args + [f"-mocktime={node1.mocktime}"])
- assert recv_txid not in node1.getrawmempool() # loading the wallet did not re-add it
+ # [first test disabled]
+ # assert recv_txid not in node1.getrawmempool() # loading the wallet did not re-add it
self.log.info("The periodic resend does not re-add it")
# Resending needs a recent tip (the restart put node1 back in IBD) and a block seen since startup
Then this second check passes (since the generate line included the tx in a block), maybe add a (redundant) check here, e.g.:
assert recv_txid not in node1.getrawmempool()
self.generate(node1, 1, sync_fun=self.no_op)
maybe spurious [why would somebody delete or move one of the tests], but IMO these long winded functional tests where each of the checks are not scoped and there's stateful stuff are hard enough to read and even though it's obvious to us reviewing this now, to my grug brain at least it would not be obvious that the properties this claims to test are only there if the test above also passes