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

Implementations

Opens a new writable instance of LedgerState from the given storage path. For a read-only instance of LedgerState, use LedgerState::open_reader.

A writable instance of LedgerState possesses full functionality, whereas a read-only instance of LedgerState may only call immutable methods.

Opens a read-only instance of LedgerState from the given storage path. For a writable instance of LedgerState, use LedgerState::open_writer.

A writable instance of LedgerState possesses full functionality, whereas a read-only instance of LedgerState may only call immutable methods.

Returns true if the ledger is in read-only mode.

Returns the latest block.

Returns the latest block height.

Returns the latest block hash.

Returns the latest block timestamp.

Returns the latest block difficulty target.

Returns the latest cumulative weight.

Returns the latest block header.

Returns the transactions from the latest block.

Returns the latest block locators.

Returns the latest ledger root.

Returns true if the given ledger root exists in storage.

Returns true if the given block height exists in storage.

Returns true if the given block hash exists in storage.

Returns true if the given transaction ID exists in storage.

Returns true if the given serial number exists in storage.

Returns true if the given commitment exists in storage.

Returns the record ciphertext for a given commitment.

Returns the transition for a given transition ID.

Returns the transaction for a given transaction ID.

Returns the transaction metadata for a given transaction ID.

Returns the cumulative weight up to a given block height (inclusive) for the canonical chain.

Returns the block height for the given block hash.

Returns the block hash for the given block height.

Returns the block hashes from the given start_block_height to end_block_height (inclusive).

Returns the previous block hash for the given block height.

Returns the block header for the given block height.

Returns the block headers from the given start_block_height to end_block_height (inclusive).

Returns the transactions from the block of the given block height.

Returns the block for a given block height.

Returns the blocks from the given start_block_height to end_block_height (inclusive).

Returns the ledger root in the block header of the given block height.

Returns the block locators of the current ledger, from the given block height.

Check that the block locators are well formed.

Returns a block template based on the latest state of the ledger.

Mines a new block using the latest state of the given ledger.

Adds the given block as the next block in the ledger to storage.

Reverts the ledger state back to the given block height, returning the removed blocks on success.

Returns a ledger proof for the given commitment.

Gracefully shuts down the ledger state.

Trait Implementations

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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 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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more