[][src]Function grin_chain::txhashset::extending_readonly

pub fn extending_readonly<F, T>(
    handle: &mut PMMRHandle<BlockHeader>,
    trees: &mut TxHashSet,
    inner: F
) -> Result<T, Error> where
    F: FnOnce(&mut ExtensionPair, &Batch) -> Result<T, Error>, 

Starts a new unit of work to extend (or rewind) the chain with additional blocks. Accepts a closure that will operate within that unit of work. The closure has access to an Extension object that allows the addition of blocks to the txhashset and the checking of the current tree roots.

The unit of work is always discarded (always rollback) as this is read-only.