mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-22 15:04:44 +01:00
[net_processing] ignore all transactions during ibd
Co-authored-by: Amiti Uttarwar <amiti@uttarwar.org>
This commit is contained in:
parent
ab25ef8c7f
commit
b9e105b664
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue