diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2013-04-19 21:28:25 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2013-07-17 03:00:59 +0000 |
commit | 203d1ae69b1b606c0216d0dc35de567c591720ae (patch) | |
tree | d362ee0e64d37258f1207ca79d946a2574fad70c /src/wallet.cpp | |
parent | c2aca505510337cc82c927bc56edcdc8d0d58dd2 (diff) |
Bugfix: Store last/next wallet resend times unique per CWallet object
Diffstat (limited to 'src/wallet.cpp')
-rw-r--r-- | src/wallet.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/wallet.cpp b/src/wallet.cpp index 488787f967..0b4c866f81 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -892,19 +892,17 @@ void CWallet::ResendWalletTransactions() { // Do this infrequently and randomly to avoid giving away // that these are our transactions. - static int64 nNextTime; - if (GetTime() < nNextTime) + if (GetTime() < nNextResend) return; - bool fFirst = (nNextTime == 0); - nNextTime = GetTime() + GetRand(30 * 60); + bool fFirst = (nNextResend == 0); + nNextResend = GetTime() + GetRand(30 * 60); if (fFirst) return; // Only do it if there's been a new block since last time - static int64 nLastTime; - if (nTimeBestReceived < nLastTime) + if (nTimeBestReceived < nLastResend) return; - nLastTime = GetTime(); + nLastResend = GetTime(); // Rebroadcast any of our txes that aren't in a block yet printf("ResendWalletTransactions()\n"); |