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

The blockchain

Implementations§

Constructs a new blockchain

Looks up a block in the chain and returns the BlockchainNode containing it

Locates a block in the chain and overwrites its txdata

Locates a block in the chain and removes its txdata

Adds a block header to the chain

Adds a block to the chain

Returns the genesis block’s blockhash

Returns the best tip

Returns the best tip height

Returns the best tip’s blockhash

Returns an array of locator hashes used in getheaders messages

An iterator over all blocks in the chain starting from start_hash

An iterator over all blocks in reverse order to the genesis, starting with start_hash

An iterator over all blocks -not- in the best chain, in reverse order, starting from start_hash

Trait Implementations§

Decode an object with a well-defined format
Encode an object with a well-defined format

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

Returns the argument unchanged.

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.