[][src]Struct db::BlockChainDatabase

pub struct BlockChainDatabase<T> where
    T: KeyValueDatabase
{ /* fields omitted */ }

Methods

impl BlockChainDatabase<CacheDatabase<AutoFlushingOverlayDatabase<DiskDatabase>>>
[src]
[]

impl BlockChainDatabase<MemoryDatabase>
[src]
[]

impl<T> BlockChainDatabase<CacheDatabase<AutoFlushingOverlayDatabase<T>>> where
    T: KeyValueDatabase
[src]
[]

impl<T> BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[]

[]

Marks block as a new best block. Block must be already inserted into db, and it's parent must be current best block. Updates meta data.

Trait Implementations

impl<T> BlockHeaderProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

resolves header bytes by block reference (number/hash)

[]

resolves header bytes by block reference (number/hash)

impl<T> BlockProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

resolves number by block hash

[]

resolves hash by block number

[]

resolves deserialized block body by block reference (number/hash)

[]

returns true if store contains given block

Important traits for Vec<u8>
[]

resolves list of block transactions by block reference (number/hash)

Important traits for Vec<u8>
[]

returns all transactions in the block by block reference (number/hash)

impl<T> IndexedBlockProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

Important traits for Vec<u8>

impl<T> TransactionMetaProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

Returns None if transactin with given hash does not exist Otherwise returns transaction meta object Read more

impl<T> TransactionProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

Resolves transaction body bytes by transaction hash.

[]

Resolves serialized transaction info by transaction hash.

[]

Returns true if store contains given transaction.

impl<T> TransactionOutputProvider for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

Returns transaction output.

[]

Returns true if we know that output is double spent.

impl<T> BlockChain for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

Inserts new block into blockchain

[]

Rollbacks single best block. Returns new best block hash

[]

Canonizes block with given hash

[]

Decanonizes best block

[]

Checks block origin

impl<T> Forkable for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

Forks current blockchain. Lifetime guarantees fork relationship with canon chain. Read more

[]

Switches blockchain to given fork. Lifetime guarantees that fork comes from this canon chain. Read more

impl<T> CanonStore for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

impl<T> Store for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

get best block

[]

get best header

[]

get blockchain difficulty

impl<T> ConfigStore for BlockChainDatabase<T> where
    T: KeyValueDatabase
[src]
[+]

[]

get consensus_fork this database is configured for

[]

set consensus_fork this database is configured for

Auto Trait Implementations

impl<T> Send for BlockChainDatabase<T>

impl<T> Sync for BlockChainDatabase<T>

Blanket Implementations

impl<T> From for T
[src]
[]

[]

Performs the conversion.

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

[]

Performs the conversion.

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.

[]

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

Performs the conversion.

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

Important traits for &'a mut R
[]

Immutably borrows from an owned value. Read more

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.

[]

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

Performs the conversion.

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

Important traits for &'a mut R
[]

Mutably borrows from an owned value. Read more

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

[]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T> Erased for T

impl<T> AsSubstore for T where
    T: BlockChain + IndexedBlockProvider + TransactionProvider + TransactionMetaProvider + TransactionOutputProvider, 
[]