pub struct Snapshot { /* private fields */ }
Expand description

A snapshot captures a point-in-time view of the DB at the time it’s created

Implementations

New snapshot created after tip change

Refreshing on block commit is necessary operation, even tip remains unchanged. when node relayed compact block,if some uncles were not available from receiver’s local sources, in GetBlockTransactions/BlockTransactions roundtrip, node will need access block data of uncles.

Return reference of tip header

Return tip header number

Return tip header hash

Return current epoch information

Return reference of Consensus

Makes a clone of the Arc<Consensus>

Return reference of proposals view

Return current best chain total_difficulty

Trait Implementations

Returns true if the cell is live corresponding to specified out_point.

TODO(doc): @quake

TODO(doc): @quake

TODO(doc): @quake

Return the bytes associated with a key value and the given column family.

Return freezer reference

TODO(doc): @quake

TODO(doc): @quake

Gets current epoch ext

Return the provider trait default implementation

Get block by block header hash

Get header by block header hash

Get block body by block header hash

Get unfrozen block from ky-store with given hash

Get all transaction-hashes in block body by block header hash

Get proposal short id by block header hash

Get block uncles by block header hash

Get block extension by block header hash

Get block ext by block header hash

Get block header hash by block number

Get block number by block header hash

TODO(doc): @quake

Returns true if the transaction confirmed in main chain. Read more

Get commit transaction and block hash by its hash

TODO(doc): @quake

Gets transaction and associated info with correspond hash

Return whether cell is live

Gets cell meta data with out_point

TODO(doc): @quake

TODO(doc): @quake

Gets epoch ext by epoch index

Gets epoch index by epoch number

Gets epoch index by block hash

TODO(doc): @quake

TODO(doc): @quake

Gets header by uncle header hash

TODO(doc): @quake

Gets cellbase by block hash

TODO(doc): @quake

TODO(doc): @quake

Returns the Consensus.

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

Check if header in main chain

Get the header of the given block hash

Get timestamp and block_number of the corresponding block_hash, and hash of parent block

Get past block median time, including the timestamp of the given one

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

TODO(doc): @quake

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Compare self to key and return true if they are equal.

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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