Skip to content

Commit

Permalink
Do not accept genesis block proofs requests
Browse files Browse the repository at this point in the history
Return error if a genesis block inclusion proof is requested.
This fixes #2421.
  • Loading branch information
viquezclaudio authored and jsdanielh committed May 2, 2024
1 parent 5b9d550 commit 72fda08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions consensus/src/messages/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ impl<N: Network> Handle<N, Arc<RwLock<Blockchain>>> for RequestBlocksProof {
if !Policy::is_election_block_at(block_number)
|| block_number > self.election_head
|| self.election_head > blockchain.election_head().block_number()
|| block_number == Policy::genesis_block_number()
{
return Err(ResponseBlocksProofError::BadBlockNumber(block_number));
}
Expand Down

0 comments on commit 72fda08

Please sign in to comment.