pub async fn validate_entries<N: NetworkZone>(
entries: VecDeque<ChainEntry<N>>,
start_height: usize,
blockchain_read_handle: &mut BlockchainReadHandle,
) -> Result<(VecDeque<ChainEntry<N>>, VecDeque<ChainEntry<N>>), BoxError>
Expand description
Validates that the given ChainEntry
s are in the fast-sync hashes.
entries
should be a list of sequential entries.
start_height
should be the height of the first block in the first entry.
Returns a tuple, the first element being the entries that are valid* the second the entries we do not know are valid and should be passed in again when we have more entries.
*once we are passed the fast sync blocks all entries will be returned as valid as we can not check their validity here.
There may be more entries returned than passed in as entries could be split.
ยงPanics
This will panic if set_fast_sync_hashes
has not been called.