From e90b831e83298907d2f9eca77bbda0a687bf13d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20Dar=C3=ADo=20Ponticelli?= Date: Tue, 5 Feb 2013 16:35:23 -0300 Subject: [PATCH] Do not call ResendWalletTransactions when reindexing, importing or on IBD Calling ResendWalletTransactions when reindexing, importing or on IBD spams other nodes with our old transactions, because they become unconfirmed. --- src/main.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index cfb459c9a..4304840fb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -3812,7 +3812,12 @@ bool SendMessages(CNode* pto, bool fSendTrickle) } // Resend wallet transactions that haven't gotten in a block yet - ResendWalletTransactions(); + // Except during reindex, importing and IBD, when old wallet + // transactions become unconfirmed and spams other nodes. + if (!fReindex && !fImporting && !IsInitialBlockDownload()) + { + ResendWalletTransactions(); + } // Address refresh broadcast static int64 nLastRebroadcast;