Skip to content

Commit b9e105b

Browse files
glozowamitiuttarwar
andcommitted
[net_processing] ignore all transactions during ibd
Co-authored-by: Amiti Uttarwar <[email protected]>
1 parent ab25ef8 commit b9e105b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net_processing.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3207,6 +3207,11 @@ void PeerManagerImpl::ProcessMessage(CNode& pfrom, const std::string& msg_type,
32073207
return;
32083208
}
32093209

3210+
// Stop processing the transaction early if we are still in IBD since we don't
3211+
// have enough information to validate it yet. Sending unsolicited transactions
3212+
// is not considered a protocol violation, so don't punish the peer.
3213+
if (m_chainman.ActiveChainstate().IsInitialBlockDownload()) return;
3214+
32103215
CTransactionRef ptx;
32113216
vRecv >> ptx;
32123217
const CTransaction& tx = *ptx;

0 commit comments

Comments
 (0)