Bitshares-Core  2.0.181105
BitShares blockchain implementation and command-line interface software
Public Member Functions | List of all members
graphene::chain::block_database Class Reference

#include <block_database.hpp>

Public Member Functions

void open (const fc::path &dbdir)
 
bool is_open () const
 
void flush ()
 
void close ()
 
void store (const block_id_type &id, const signed_block &b)
 
void remove (const block_id_type &id)
 
bool contains (const block_id_type &id) const
 
block_id_type fetch_block_id (uint32_t block_num) const
 
optional< signed_blockfetch_optional (const block_id_type &id) const
 
optional< signed_blockfetch_by_number (uint32_t block_num) const
 
optional< signed_blocklast () const
 
optional< block_id_typelast_id () const
 
size_t blocks_current_position () const
 
size_t total_block_size () const
 

Detailed Description

Definition at line 31 of file block_database.hpp.

Member Function Documentation

◆ blocks_current_position()

size_t graphene::chain::block_database::blocks_current_position ( ) const

Definition at line 274 of file block_database.cpp.

◆ close()

void graphene::chain::block_database::close ( )

Definition at line 66 of file block_database.cpp.

◆ contains()

bool graphene::chain::block_database::contains ( const block_id_type id) const

Definition at line 116 of file block_database.cpp.

◆ fetch_block_id()

block_id_type graphene::chain::block_database::fetch_block_id ( uint32_t  block_num) const

Definition at line 132 of file block_database.cpp.

◆ fetch_by_number()

optional< signed_block > graphene::chain::block_database::fetch_by_number ( uint32_t  block_num) const

Definition at line 180 of file block_database.cpp.

◆ fetch_optional()

optional< signed_block > graphene::chain::block_database::fetch_optional ( const block_id_type id) const

Definition at line 148 of file block_database.cpp.

◆ flush()

void graphene::chain::block_database::flush ( )

Definition at line 72 of file block_database.cpp.

◆ is_open()

bool graphene::chain::block_database::is_open ( ) const

Definition at line 61 of file block_database.cpp.

◆ last()

optional< signed_block > graphene::chain::block_database::last ( ) const

Definition at line 260 of file block_database.cpp.

◆ last_id()

optional< block_id_type > graphene::chain::block_database::last_id ( ) const

Definition at line 267 of file block_database.cpp.

◆ open()

void graphene::chain::block_database::open ( const fc::path &  dbdir)

Definition at line 42 of file block_database.cpp.

◆ remove()

void graphene::chain::block_database::remove ( const block_id_type id)

Definition at line 97 of file block_database.cpp.

◆ store()

void graphene::chain::block_database::store ( const block_id_type id,
const signed_block b 
)

Definition at line 78 of file block_database.cpp.

◆ total_block_size()

size_t graphene::chain::block_database::total_block_size ( ) const

Definition at line 279 of file block_database.cpp.


The documentation for this class was generated from the following files: