[net_processing] ignore all transactions during ibd

Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
pull/21327/head
glozow 4 years ago committed by glozow
parent ab25ef8c7f
commit b9e105b664

@ -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;

Loading…
Cancel
Save