Skip to main content

compute_range_trie_changesets

Function compute_range_trie_changesets 

Source
pub fn compute_range_trie_changesets<Provider>(
    provider: &Provider,
    range: RangeInclusive<u64>,
    db_tip_block: u64,
) -> Result<TrieUpdatesSorted, ProviderError>
Available on crate features trie-db and trie only.
Expand description

Computes aggregate trie changesets for an inclusive block range.

The returned changesets restore the trie from the state after range.end() to the state before range.start(). db_tip_block must be the current database tip for provider.

ยงErrors

Returns an error if the range exceeds db_tip_block, database access fails, or state root computation fails.