diff options
author | MacroFake <falke.marco@gmail.com> | 2022-09-20 12:06:24 +0200 |
---|---|---|
committer | MacroFake <falke.marco@gmail.com> | 2022-09-20 11:49:57 +0200 |
commit | fad61573ed547615f73710cb59b2fb0ecafed127 (patch) | |
tree | 5611db7e38983068c06d9ee242fbaa3be176b52c /src/wallet/wallet.cpp | |
parent | 9f650062fc4350d8c50ac8890cddd4d99f20f895 (diff) | |
download | bitcoin-fad61573ed547615f73710cb59b2fb0ecafed127.tar.xz |
Fix nNextResend data race in ResubmitWalletTransactions
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r-- | src/wallet/wallet.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e0f1655ab7..009c539a65 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1907,7 +1907,7 @@ std::set<uint256> CWallet::GetTxConflicts(const CWalletTx& wtx) const // mempool to relay them. On startup, we will do this for all unconfirmed // transactions but will not ask the mempool to relay them. We do this on startup // to ensure that our own mempool is aware of our transactions, and to also -// initialize nNextResend so that the actual rebroadcast is scheduled. There +// initialize m_next_resend so that the actual rebroadcast is scheduled. There // is a privacy side effect here as not broadcasting on startup also means that we won't // inform the world of our wallet's state, particularly if the wallet (or node) is not // yet synced. @@ -1941,9 +1941,9 @@ void CWallet::ResubmitWalletTransactions(bool relay, bool force) // Do this infrequently and randomly to avoid giving away // that these are our transactions. - if (!force && GetTime() < nNextResend) return; + if (!force && GetTime() < m_next_resend) return; // resend 12-36 hours from now, ~1 day on average. - nNextResend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60); + m_next_resend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60); int submitted_tx_count = 0; |