diff options
author | Andrew Chow <achow101-github@achow101.com> | 2022-08-24 16:40:30 -0400 |
---|---|---|
committer | Andrew Chow <github@achow101.com> | 2022-08-29 12:38:06 -0400 |
commit | 10d91c5abe9ed7dcc237c9d52c588e7d26e162a4 (patch) | |
tree | 35f27e60e47de78cc66bbd4df65284166cec5e58 /src/wallet/wallet.h | |
parent | e191fac4f3c37820f0618f72f0a8e8b524531ab8 (diff) | |
download | bitcoin-10d91c5abe9ed7dcc237c9d52c588e7d26e162a4.tar.xz |
wallet: Deduplicate Resend and ReacceptWalletTransactions
Both of these functions do almost the exact same thing. They can be
deduplicated so that their behavior matches except for the filtering
aspect. As this function will now always be called on wallet loading,
nNextResend will also always be initialized, so
wallet_resendwallettransactions.py is updated to account for that.
This also resolves a bug where ResendWalletTransactions would fail to
rebroadcast txs in insertion order thereby potentially rebroadcasting a
child transaction before its parent and causing the child to not
actually get rebroadcast.
Also names the combined function to ResubmitWalletTransactions as the
function just submits the transactions to the mempool rather than doing
any sending by itself.
Diffstat (limited to 'src/wallet/wallet.h')
-rw-r--r-- | src/wallet/wallet.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 9281045c21..7abe090fad 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -537,8 +537,7 @@ public: }; ScanResult ScanForWalletTransactions(const uint256& start_block, int start_height, std::optional<int> max_height, const WalletRescanReserver& reserver, bool fUpdate, const bool save_progress); void transactionRemovedFromMempool(const CTransactionRef& tx, MemPoolRemovalReason reason, uint64_t mempool_sequence) override; - void ReacceptWalletTransactions() EXCLUSIVE_LOCKS_REQUIRED(cs_wallet); - void ResendWalletTransactions(); + void ResubmitWalletTransactions(bool relay, bool force); OutputType TransactionChangeType(const std::optional<OutputType>& change_type, const std::vector<CRecipient>& vecSend) const; |