chore(sync): add block number to body validation error (#7918)

Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Emilia Hane
2024-04-26 18:39:35 +02:00
committed by GitHub
parent 51bdc6afe8
commit 704b3e3ac4
2 changed files with 10 additions and 3 deletions

View File

@@ -158,10 +158,12 @@ pub enum DownloadError {
/* ==================== BODIES ERRORS ==================== */
/// Block validation failed
#[error("failed to validate body for header {hash}: {error}")]
#[error("failed to validate body for header {hash}, block number {number}: {error}")]
BodyValidation {
/// Hash of header failing validation
/// Hash of the block failing validation
hash: B256,
/// Number of the block failing validation
number: u64,
/// The details of validation failure
#[source]
error: Box<ConsensusError>,