[][src]Struct grin_chain::txhashset::TxHashSet

pub struct TxHashSet { /* fields omitted */ }

An easy to manipulate structure holding the 3 sum trees necessary to validate blocks and capturing the Output set, the range proofs and the kernels. Also handles the index of Commitments to positions in the output and range proof pmmr trees.

Note that the index is never authoritative, only the trees are guaranteed to indicate whether an output is spent or not. The index may have commitments that have already been spent, even with pruning enabled.

Methods

impl TxHashSet
[src]

Open an existing or new set of backends for the TxHashSet

Check if an output is unspent. We look in the index to find the output MMR pos. Then we check the entry in the output MMR and confirm the hash matches.

returns the last N nodes inserted into the tree (i.e. the 'bottom' nodes at level 0 TODO: These need to return the actual data from the flat-files instead of hashes now

as above, for range proofs

as above, for kernels

Get the header at the specified height based on the current state of the txhashset. Derives the MMR pos from the height (insertion index) and retrieves the header hash. Looks the header up in the db by hash.

returns outputs from the given insertion (leaf) index up to the specified limit. Also returns the last index actually populated

highest output insertion index available

As above, for rangeproofs

Get MMR roots.

build a new merkle proof for the given position.

Compact the MMR data files and flush the rm logs

Auto Trait Implementations

impl Send for TxHashSet

impl Sync for TxHashSet

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SafeBorrow for T where
    T: ?Sized

impl<T> UnsafeAny for T where
    T: Any

impl<T> Erased for T

impl<T> Same for T

Should always be Self