mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
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:
parent
6539728ce0
commit
82953c07c2
3 changed files with 9 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue