[wallet] Update the rebroadcast frequency to be ~1/day.

Since the mempool unbroadcast mechanism handles the reattempts for initial
broadcast, the wallet rebroadcast attempts can be much less frequent
(previously ~1/30 min)
This commit is contained in:
Amiti Uttarwar
2020-01-29 08:21:02 -08:00
parent e25e42f20a
commit dc1da48dc5
2 changed files with 6 additions and 4 deletions

View File

@@ -1978,7 +1978,8 @@ void CWallet::ResendWalletTransactions()
// that these are our transactions.
if (GetTime() < nNextResend || !fBroadcastTransactions) return;
bool fFirst = (nNextResend == 0);
nNextResend = GetTime() + GetRand(30 * 60);
// resend 12-36 hours from now, ~1 day on average.
nNextResend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60);
if (fFirst) return;
// Only do it if there's been a new block since last time