pub struct Ledger<N: Network> { /* private fields */ }

Implementations

Initializes a new instance of the ledger.

Returns the latest block height.

Returns the latest block hash.

Returns the latest ledger root.

Returns the latest block timestamp.

Returns the latest block difficulty target.

Returns the latest cumulative weight.

Returns the latest block transactions.

Returns the latest block.

Returns true if the given ledger root exists on the canon chain.

Returns true if the given block hash exists on the canon chain.

Returns true if the given transaction exists on the canon chain.

Adds the given canon block, if it is well-formed and does not already exist. Note: This method requires blocks to be added in order of canon block height.

Adds the given orphan block, if it is well-formed and does not already exist.

Adds the given unconfirmed transaction to the memory pool.

Mines a new block and adds it to the canon blocks.

Returns the ledger tree.

Returns the ledger proof for the given commitment with the current ledger root.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.