mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-07 22:24:34 +01:00
Merge bitcoin/bitcoin#21327: net_processing: ignore transactions while in IBD
6aed8b7e9b[test] tx processing before and after ibd (glozow)b9e105b664[net_processing] ignore all transactions during ibd (glozow) Pull request description: This is basically a mini, IBD-only version of #21224 Incoming transactions aren't really relevant until we're caught up. That's why we send a giant feefilter and don't send tx getdatas, but we also shouldn't process them if peers send them anyway. Simply ignore them. ACKs for top commit: jnewbery: reACK6aed8b7e9blaanwj: Code review ACK6aed8b7e9bTree-SHA512: 8e1616bf355f9d0b180bdbc5461f24c757dc5d7bc7bf651470f3b0bffcca5d5e68287106255b5cede2d96b42bce448a0f8c0649de35a530c5e079f7c89c70a35
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user