compute_trie_changesets

Function compute_trie_changesets 

Source
pub fn compute_trie_changesets<Factory>(
    factory: &Factory,
    trie_updates: &TrieUpdatesSorted,
) -> Result<TrieUpdatesSorted, DatabaseError>
where Factory: TrieCursorFactory,
Available on crate feature trie only.
Expand description

Computes trie changesets by looking up current node values from the trie.

Takes the new trie updates and queries the trie for the old values of changed nodes. Returns changesets representing the state before the block was applied, suitable for reorg operations.

§Arguments

  • factory - Trie cursor factory for reading current trie state
  • trie_updates - New trie node values produced by state root computation

§Returns

TrieUpdatesSorted containing old node values (before this block)