Skip to content

Validate block_to is not greater than chain tip #1866

@TomasArrachea

Description

@TomasArrachea

In some sync endpoints we receive a block range that gets handled like so:

let block_range =
read_block_range::<SyncNullifiersError>(request.block_range, "SyncNullifiersRequest")?
.into_inclusive_range::<SyncNullifiersError>(&chain_tip)?;

We could modify the read_block_range to validate that the block_to is not greater than the chain tip.

Context: #1843 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions