Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/wallet.cpp
Show First 20 Lines • Show All 2,203 Lines • ▼ Show 20 Lines | void CWallet::ResendWalletTransactions() { | ||||
bool fFirst = (nNextResend == 0); | bool fFirst = (nNextResend == 0); | ||||
// resend 12-36 hours from now, ~1 day on average. | // resend 12-36 hours from now, ~1 day on average. | ||||
nNextResend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60); | nNextResend = GetTime() + (12 * 60 * 60) + GetRand(24 * 60 * 60); | ||||
if (fFirst) { | if (fFirst) { | ||||
return; | return; | ||||
} | } | ||||
// Only do it if there's been a new block since last time | |||||
if (m_best_block_time < nLastResend) { | |||||
return; | |||||
} | |||||
nLastResend = GetTime(); | |||||
int submitted_tx_count = 0; | int submitted_tx_count = 0; | ||||
{ // cs_wallet scope | { // cs_wallet scope | ||||
LOCK(cs_wallet); | LOCK(cs_wallet); | ||||
// Relay transactions | // Relay transactions | ||||
for (std::pair<const TxId, CWalletTx> &item : mapWallet) { | for (std::pair<const TxId, CWalletTx> &item : mapWallet) { | ||||
CWalletTx &wtx = item.second; | CWalletTx &wtx = item.second; | ||||
▲ Show 20 Lines • Show All 2,829 Lines • Show Last 20 Lines |