Refactor CWalletTx::RelayWalletTransaction()
function.
This was a suggestion from the wallet-node separation PR: #15288 (review), which we deferred until after the main PR was merged.
There are also makes two minor behavior changes:
- no longer assert if fBroadcastTransactions is false. Just return false from the function.
- no longer print the relay message if p2pEnabled is set to false (since the transaction is not actually relayed).