[net_processing] ignore all transactions during ibd

Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
This commit is contained in:
glozowandAmiti Uttarwar authored and glozow committed 2021-10-28 16:31:22 +01:00
1 parent ab25ef8c7f
commit b9e105b664
1 file changed
+5
+5
View File
@@ -3207,6 +3207,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
return;
}
// Stop processing the transaction early if we are still in IBD since we don't
// have enough information to validate it yet. Sending unsolicited transactions
// is not considered a protocol violation, so don't punish the peer.
if (m_chainman.ActiveChainstate().IsInitialBlockDownload()) return;
CTransactionRef ptx;
vRecv >> ptx;
const CTransaction& tx = *ptx;