Merge 63c0d0e937 into merged_master (Bitcoin PR bitcoin/bitcoin#21327)

I commented out a few new lines at the bottom of test/functional/p2p_ibd_txrelay.py
It tests that nodes process certain transactions, after IBD. These new assertions
from upstream are failing, but it may be because our IBD / tx sharing logic is different.

We should revisit this.
This commit is contained in:
James Dorfman 2023-05-31 16:39:08 +00:00
commit 5aadbb7a9d
3 changed files with 60 additions and 2 deletions

View file

@ -3264,6 +3264,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;