aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet.cpp
diff options
context:
space:
mode:
authorAmiti Uttarwar <amiti@uttarwar.org>2020-01-29 08:21:02 -0800
committerAmiti Uttarwar <amiti@uttarwar.org>2020-04-23 14:42:25 -0700
commitdc1da48dc5e5526215561311c184a8cbc345ecdc (patch)
tree356652687f4ae7d122a7d2d63a8d4ade6a0448f5 /src/wallet/wallet.cpp
parente25e42f20a3aa39651fbc1f9fa3df1a49f1f5868 (diff)
downloadbitcoin-dc1da48dc5e5526215561311c184a8cbc345ecdc.tar.xz
[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)
Diffstat (limited to 'src/wallet/wallet.cpp')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index 9a972febab..6eee0ccfc6 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -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