re enabled p2p_invalid_messages.py, disabled PoW test, set elements message size and changed net_processing to check for continuous headers in elements mode

This commit is contained in:
Tom Trevethan 2025-10-20 23:09:10 +01:00
parent 6539728ce0
commit 82953c07c2
3 changed files with 9 additions and 10 deletions

View file

@ -2491,12 +2491,6 @@ bool PeerManagerImpl::CheckHeadersPoW(const std::vector<CBlockHeader>& headers,
Misbehaving(peer, 100, "header with invalid proof of work");
return false;
}
// Are these headers connected to each other?
if (!CheckHeadersAreContinuous(headers)) {
Misbehaving(peer, 20, "non-continuous headers sequence");
return false;
}
return true;
}
@ -2882,6 +2876,11 @@ void PeerManagerImpl::ProcessHeadersMessage(CNode& pfrom, Peer& peer,
// always be punished.)
return;
}
// Check that headers are connected to each other in a continuous sequence
if(!CheckHeadersAreContinuous(headers)) {
Misbehaving(peer, 20, "non-continuous headers sequence");
return;
}
// If we are already too far ahead of where we want to be on headers, discard
// the received headers. We can still get ahead by up to a single maximum-sized