diff options
Diffstat (limited to 'src/net_processing.cpp')
-rw-r--r-- | src/net_processing.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/net_processing.cpp b/src/net_processing.cpp index a896bb76ae..3f755eb178 100644 --- a/src/net_processing.cpp +++ b/src/net_processing.cpp @@ -3206,6 +3206,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; |