Scorum
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
scorum::chain::database Class Reference

tracks the blockchain state in an extensible manner More...

#include <database.hpp>

Inheritance diagram for scorum::chain::database:
scorum::chain::dbservice_dbs_factory scorum::chain::dba::db_accessor_factory scorum::chain::database_virtual_operations_emmiter_i

Public Types

enum  creation_option { opt_none = 0 , opt_log_hardforks = 1 << 0 , opt_notify_virtual_op_applying = 1 << 1 , opt_default = opt_log_hardforks | opt_notify_virtual_op_applying }
 
enum  validation_steps {
  skip_nothing = 0 , skip_witness_signature = 1 << 0 , skip_transaction_signatures = 1 << 1 , skip_transaction_dupe_check = 1 << 2 ,
  skip_fork_db = 1 << 3 , skip_block_size_check = 1 << 4 , skip_tapos_check = 1 << 5 , skip_authority_check = 1 << 6 ,
  skip_merkle_check = 1 << 7 , skip_undo_history_check = 1 << 8 , skip_witness_schedule_check = 1 << 9 , skip_validate = 1 << 10 ,
  skip_validate_invariants = 1 << 11 , skip_undo_block = 1 << 12 , skip_block_log = 1 << 13
}
 

Public Member Functions

 database (uint32_t opt)
 
virtual ~database ()
 
bool is_producing () const
 
uint32_t get_reindex_skip_flags () const
 
void open (const fc::path &data_dir, const fc::path &shared_mem_dir, uint64_t shared_file_size, uint32_t chainbase_flags, const genesis_state_type &genesis_state)
 Open a database, creating a new one if necessary. More...
 
void reindex (const fc::path &data_dir, const fc::path &shared_mem_dir, uint64_t shared_file_size, uint32_t skip_flags, const genesis_state_type &genesis_state)
 Rebuild object graph from block history and open detabase. More...
 
void wipe (const fc::path &data_dir, const fc::path &shared_mem_dir, bool include_blocks)
 wipe Delete database from disk, and potentially the raw chain as well. More...
 
void close ()
 
time_point_sec get_genesis_time () const
 
bool is_known_block (const block_id_type &id) const
 
bool is_known_transaction (const transaction_id_type &id) const
 
block_id_type find_block_id_for_num (uint32_t block_num) const
 
block_id_type get_block_id_for_num (uint32_t block_num) const
 
optional< signed_blockfetch_block_by_id (const block_id_type &id) const
 
optional< signed_blockfetch_block_by_number (uint32_t num) const
 
optional< signed_blockread_block_by_number (uint32_t num) const
 
const signed_transaction get_recent_transaction (const transaction_id_type &trx_id) const
 
std::vector< block_id_typeget_block_ids_on_fork (block_id_type head_of_fork) const
 
chain_id_type get_chain_id () const
 
const node_property_objectget_node_properties () const
 
const time_point_sec calculate_discussion_payout_time (const comment_object &comment) const
 
uint32_t witness_participation_rate () const
 
void add_checkpoints (const flat_map< uint32_t, block_id_type > &checkpts)
 
const flat_map< uint32_t, block_id_typeget_checkpoints () const
 
bool before_last_checkpoint () const
 
bool push_block (const signed_block &b, uint32_t skip=skip_nothing)
 
void push_transaction (const signed_transaction &trx, uint32_t skip=skip_nothing)
 
void _push_transaction (const signed_transaction &trx)
 
signed_block generate_block (const fc::time_point_sec when, const account_name_type &witness_owner, const fc::ecc::private_key &block_signing_private_key, uint32_t skip)
 
void pop_block ()
 
void clear_pending ()
 
void notify_pre_apply_operation (const operation_notification &note)
 
void notify_post_apply_operation (const operation_notification &note)
 
operation_notification create_notification (const operation &op) const
 
void push_virtual_operation (const operation &op)
 
void push_hf_operation (const operation &op)
 
void notify_pre_applied_block (const signed_block &block)
 
void notify_applied_block (const signed_block &block)
 
void notify_on_pending_transaction (const signed_transaction &tx)
 
void notify_on_pre_apply_transaction (const signed_transaction &tx)
 
void notify_on_applied_transaction (const signed_transaction &tx)
 
account_name_type get_scheduled_witness (uint32_t slot_num) const
 Get the witness scheduled for block production in a slot. More...
 
fc::time_point_sec get_slot_time (uint32_t slot_num) const
 
uint32_t get_slot_at_time (fc::time_point_sec when) const
 
void account_recovery_processing ()
 
void expire_escrow_ratification ()
 
void process_decline_voting_rights ()
 
time_point_sec head_block_time () const
 
uint32_t head_block_num () const
 
block_id_type head_block_id () const
 
block_info head_block_context () const
 
node_property_objectnode_properties ()
 
uint32_t last_non_undoable_block_num () const
 
void initialize_evaluators ()
 
void initialize_indexes ()
 Reset the object graph in-memory. More...
 
void set_initial_timestamp (const genesis_state_type &genesis_state)
 
void init_genesis (const genesis_state_type &genesis_state)
 
void validate_transaction (const signed_transaction &trx)
 
bool has_hardfork (uint32_t hardfork) const
 
void set_hardfork (uint32_t hardfork, bool process_now=true)
 
void validate_invariants () const
 
void set_flush_interval (uint32_t flush_blocks)
 
void show_free_memory (bool force)
 
template<typename MultiIndexType >
void add_plugin_index ()
 
const genesis_persistent_state_typegenesis_persistent_state () const
 
- Public Member Functions inherited from scorum::chain::dbservice_dbs_factory
template<typename ConcreteService >
ConcreteService & obtain_service () const
 
template<typename ConcreteService , typename... TDependencies>
ConcreteService & obtain_service_explicit (TDependencies &... dependencies) const
 
- Public Member Functions inherited from scorum::chain::dba::db_accessor_factory
 db_accessor_factory (db_index &db)
 
template<typename TObject >
db_accessor< TObject > & get_dba () const
 
- Public Member Functions inherited from scorum::chain::database_virtual_operations_emmiter_i
virtual ~database_virtual_operations_emmiter_i ()=default
 

Static Public Member Functions

static fc::path block_log_path (const fc::path &data_dir)
 

Public Attributes

fc::signal< void(const operation_notification &)> pre_apply_operation
 
fc::signal< void(const operation_notification &)> post_apply_operation
 
fc::signal< void(const signed_block &)> pre_applied_block
 
fc::signal< void(const signed_block &)> applied_block
 
fc::signal< void(const signed_transaction &)> on_pending_transaction
 
fc::signal< void(const signed_transaction &)> on_pre_apply_transaction
 
fc::signal< void(const signed_transaction &)> on_applied_transaction
 
std::deque< signed_transaction_popped_tx
 
- Public Attributes inherited from scorum::chain::dba::db_accessor_factory
boost::container::flat_map< boost::typeindex::type_index, boost::any > _db_accessors
 
db_index_db
 

Protected Member Functions

void set_producing (bool p)
 
void apply_block (const signed_block &next_block, uint32_t skip=skip_nothing)
 
void apply_transaction (const signed_transaction &trx, uint32_t skip=skip_nothing)
 
void _apply_block (const signed_block &next_block)
 
void _apply_transaction (const signed_transaction &trx)
 
void apply_operation (const operation &op)
 
const witness_objectvalidate_block_header (uint32_t skip, const signed_block &next_block) const
 
void create_block_summary (const signed_block &next_block)
 
void update_global_dynamic_data (const signed_block &b)
 
void update_signing_witness (const witness_object &signing_witness, const signed_block &new_block)
 
void update_last_irreversible_block ()
 
void clear_expired_transactions ()
 
void clear_expired_delegations ()
 
void process_header_extensions (const signed_block &next_block)
 
void init_hardforks (fc::time_point_sec genesis_time)
 
void process_hardforks ()
 
void apply_hardfork (uint32_t hardfork)
 
- Protected Member Functions inherited from scorum::chain::dbservice_dbs_factory
 dbservice_dbs_factory ()=delete
 
 dbservice_dbs_factory (database &)
 
virtual ~dbservice_dbs_factory ()
 

Detailed Description

tracks the blockchain state in an extensible manner

Definition at line 47 of file database.hpp.

Member Enumeration Documentation

◆ creation_option

Enumerator
opt_none 
opt_log_hardforks 
opt_notify_virtual_op_applying 
opt_default 

Definition at line 55 of file database.hpp.

◆ validation_steps

Enumerator
skip_nothing 
skip_witness_signature 

used while reindexing

skip_transaction_signatures 

used by non-witness nodes

skip_transaction_dupe_check 

used while reindexing

skip_fork_db 

used while reindexing

skip_block_size_check 

used when applying locally generated transactions

skip_tapos_check 

used while reindexing – note this skips expiration check as well

skip_authority_check 

used while reindexing – disables any checking of authority on transactions

skip_merkle_check 

used while reindexing

skip_undo_history_check 

used while reindexing

skip_witness_schedule_check 

used while reindexing

skip_validate 

used prior to checkpoint, skips validate() call on transaction

skip_validate_invariants 

used to skip database invariant check on block application

skip_undo_block 

used to skip undo db on reindex

skip_block_log 

used to skip block logging on reindex

Definition at line 76 of file database.hpp.

Constructor & Destructor Documentation

◆ database()

scorum::chain::database::database ( uint32_t  opt)

Definition at line 168 of file database.cpp.

◆ ~database()

scorum::chain::database::~database ( )
virtual

Definition at line 178 of file database.cpp.

Member Function Documentation

◆ _apply_block()

void scorum::chain::database::_apply_block ( const signed_block next_block)
protected

modify current witness so transaction evaluators can know who included the transaction, this is mostly for POW operations which must pay the current_witness

parse witness version reporting

Definition at line 1514 of file database.cpp.

◆ _apply_transaction()

void scorum::chain::database::_apply_transaction ( const signed_transaction trx)
protected

Definition at line 1710 of file database.cpp.

◆ _push_transaction()

void scorum::chain::database::_push_transaction ( const signed_transaction trx)

Definition at line 774 of file database.cpp.

◆ account_recovery_processing()

void scorum::chain::database::account_recovery_processing ( )

Definition at line 1132 of file database.cpp.

◆ add_checkpoints()

void scorum::chain::database::add_checkpoints ( const flat_map< uint32_t, block_id_type > &  checkpts)

Definition at line 554 of file database.cpp.

◆ add_plugin_index()

template<typename MultiIndexType >
void scorum::chain::database::add_plugin_index ( )
inline

Definition at line 326 of file database.hpp.

◆ apply_block()

void scorum::chain::database::apply_block ( const signed_block next_block,
uint32_t  skip = skip_nothing 
)
protected

check invariants

Definition at line 1415 of file database.cpp.

◆ apply_hardfork()

void scorum::chain::database::apply_hardfork ( uint32_t  hardfork)
protected

Definition at line 2155 of file database.cpp.

◆ apply_operation()

void scorum::chain::database::apply_operation ( const operation op)
protected

Definition at line 1807 of file database.cpp.

◆ apply_transaction()

void scorum::chain::database::apply_transaction ( const signed_transaction trx,
uint32_t  skip = skip_nothing 
)
protected

Definition at line 1704 of file database.cpp.

◆ before_last_checkpoint()

bool scorum::chain::database::before_last_checkpoint ( ) const

Definition at line 562 of file database.cpp.

◆ block_log_path()

fc::path scorum::chain::database::block_log_path ( const fc::path &  data_dir)
static

Definition at line 183 of file database.cpp.

◆ calculate_discussion_payout_time()

const time_point_sec scorum::chain::database::calculate_discussion_payout_time ( const comment_object &  comment) const

Definition at line 543 of file database.cpp.

◆ clear_expired_delegations()

void scorum::chain::database::clear_expired_delegations ( )
protected

Definition at line 2047 of file database.cpp.

◆ clear_expired_transactions()

void scorum::chain::database::clear_expired_transactions ( )
protected

Definition at line 2035 of file database.cpp.

◆ clear_pending()

void scorum::chain::database::clear_pending ( )

Definition at line 1008 of file database.cpp.

◆ close()

void scorum::chain::database::close ( )

Definition at line 350 of file database.cpp.

◆ create_block_summary()

void scorum::chain::database::create_block_summary ( const signed_block next_block)
protected

Definition at line 1854 of file database.cpp.

◆ create_notification()

operation_notification scorum::chain::database::create_notification ( const operation op) const

Definition at line 1029 of file database.cpp.

◆ expire_escrow_ratification()

void scorum::chain::database::expire_escrow_ratification ( )

Definition at line 1170 of file database.cpp.

◆ fetch_block_by_id()

optional< signed_block > scorum::chain::database::fetch_block_by_id ( const block_id_type id) const

Definition at line 447 of file database.cpp.

◆ fetch_block_by_number()

optional< signed_block > scorum::chain::database::fetch_block_by_number ( uint32_t  num) const

Definition at line 470 of file database.cpp.

◆ find_block_id_for_num()

block_id_type scorum::chain::database::find_block_id_for_num ( uint32_t  block_num) const

Definition at line 400 of file database.cpp.

◆ generate_block()

signed_block scorum::chain::database::generate_block ( const fc::time_point_sec  when,
const account_name_type witness_owner,
const fc::ecc::private_key &  block_signing_private_key,
uint32_t  skip 
)

Definition at line 800 of file database.cpp.

◆ genesis_persistent_state()

const genesis_persistent_state_type & scorum::chain::database::genesis_persistent_state ( ) const

Definition at line 2065 of file database.cpp.

◆ get_block_id_for_num()

block_id_type scorum::chain::database::get_block_id_for_num ( uint32_t  block_num) const

Definition at line 440 of file database.cpp.

◆ get_block_ids_on_fork()

std::vector< block_id_type > scorum::chain::database::get_block_ids_on_fork ( block_id_type  head_of_fork) const

Definition at line 511 of file database.cpp.

◆ get_chain_id()

chain_id_type scorum::chain::database::get_chain_id ( ) const

Definition at line 533 of file database.cpp.

◆ get_checkpoints()

const flat_map<uint32_t, block_id_type> scorum::chain::database::get_checkpoints ( ) const
inline

Definition at line 167 of file database.hpp.

◆ get_genesis_time()

fc::time_point_sec scorum::chain::database::get_genesis_time ( ) const

Definition at line 30 of file genesis.cpp.

◆ get_node_properties()

const node_property_object & scorum::chain::database::get_node_properties ( ) const

Definition at line 538 of file database.cpp.

◆ get_recent_transaction()

const signed_transaction scorum::chain::database::get_recent_transaction ( const transaction_id_type trx_id) const

Definition at line 496 of file database.cpp.

◆ get_reindex_skip_flags()

uint32_t scorum::chain::database::get_reindex_skip_flags ( ) const

Definition at line 188 of file database.cpp.

◆ get_scheduled_witness()

account_name_type scorum::chain::database::get_scheduled_witness ( uint32_t  slot_num) const

Get the witness scheduled for block production in a slot.

slot_num always corresponds to a time in the future.

If slot_num == 1, returns the next scheduled witness. If slot_num == 2, returns the next scheduled witness after 1 block gap.

Use the get_slot_time() and get_slot_at_time() functions to convert between slot_num and timestamp.

Passing slot_num == 0 returns SCORUM_NULL_WITNESS

Definition at line 1086 of file database.cpp.

◆ get_slot_at_time()

uint32_t scorum::chain::database::get_slot_at_time ( fc::time_point_sec  when) const

Get the last slot which occurs AT or BEFORE the given time.

The return value is the greatest value N such that get_slot_time( N ) <= when.

If no such N exists, return 0.

Definition at line 1122 of file database.cpp.

◆ get_slot_time()

fc::time_point_sec scorum::chain::database::get_slot_time ( uint32_t  slot_num) const

Get the time at which the given slot occurs.

If slot_num == 0, return time_point_sec().

If slot_num == N for N > 0, return the Nth next block-interval-aligned time greater than head_block_time().

Definition at line 1095 of file database.cpp.

◆ has_hardfork()

bool scorum::chain::database::has_hardfork ( uint32_t  hardfork) const

Definition at line 2132 of file database.cpp.

◆ head_block_context()

block_info scorum::chain::database::head_block_context ( ) const

Definition at line 1237 of file database.cpp.

◆ head_block_id()

block_id_type scorum::chain::database::head_block_id ( ) const

Definition at line 1232 of file database.cpp.

◆ head_block_num()

uint32_t scorum::chain::database::head_block_num ( ) const

Definition at line 1227 of file database.cpp.

◆ head_block_time()

time_point_sec scorum::chain::database::head_block_time ( ) const

Definition at line 1222 of file database.cpp.

◆ init_genesis()

void scorum::chain::database::init_genesis ( const genesis_state_type genesis_state)

Definition at line 40 of file genesis.cpp.

◆ init_hardforks()

void scorum::chain::database::init_hardforks ( fc::time_point_sec  genesis_time)
protected

Definition at line 2070 of file database.cpp.

◆ initialize_evaluators()

void scorum::chain::database::initialize_evaluators ( )

Definition at line 1262 of file database.cpp.

◆ initialize_indexes()

void scorum::chain::database::initialize_indexes ( )

Reset the object graph in-memory.

Definition at line 1336 of file database.cpp.

◆ is_known_block()

bool scorum::chain::database::is_known_block ( const block_id_type id) const
Returns
true if the block is in our fork DB or saved to disk as part of the official chain, otherwise return false

Definition at line 376 of file database.cpp.

◆ is_known_transaction()

bool scorum::chain::database::is_known_transaction ( const transaction_id_type id) const

Only return true if the transaction has not expired or been invalidated. If this method is called with a VERY old transaction we will return false, they should query things by blocks if they are that old.

Definition at line 390 of file database.cpp.

◆ is_producing()

bool scorum::chain::database::is_producing ( ) const
inline

Definition at line 71 of file database.hpp.

◆ last_non_undoable_block_num()

uint32_t scorum::chain::database::last_non_undoable_block_num ( ) const

Definition at line 1257 of file database.cpp.

◆ node_properties()

node_property_object & scorum::chain::database::node_properties ( )

Definition at line 1252 of file database.cpp.

◆ notify_applied_block()

void scorum::chain::database::notify_applied_block ( const signed_block block)

Definition at line 1066 of file database.cpp.

◆ notify_on_applied_transaction()

void scorum::chain::database::notify_on_applied_transaction ( const signed_transaction tx)

Definition at line 1081 of file database.cpp.

◆ notify_on_pending_transaction()

void scorum::chain::database::notify_on_pending_transaction ( const signed_transaction tx)

Definition at line 1071 of file database.cpp.

◆ notify_on_pre_apply_transaction()

void scorum::chain::database::notify_on_pre_apply_transaction ( const signed_transaction tx)

Definition at line 1076 of file database.cpp.

◆ notify_post_apply_operation()

void scorum::chain::database::notify_post_apply_operation ( const operation_notification note)

Definition at line 1024 of file database.cpp.

◆ notify_pre_applied_block()

void scorum::chain::database::notify_pre_applied_block ( const signed_block block)

Definition at line 1061 of file database.cpp.

◆ notify_pre_apply_operation()

void scorum::chain::database::notify_pre_apply_operation ( const operation_notification note)

This method is used to track applied operations during the evaluation of a block, these operations should include any operation actually included in a transaction as well as any implied/virtual operations that resulted, such as filling an order. The applied operations are cleared after post_apply_operation.

Definition at line 1019 of file database.cpp.

◆ open()

void scorum::chain::database::open ( const fc::path &  data_dir,
const fc::path &  shared_mem_dir,
uint64_t  shared_file_size,
uint32_t  chainbase_flags,
const genesis_state_type genesis_state 
)

Open a database, creating a new one if necessary.

Opens a database in the specified directory. If no initialized database is found the database will be initialized with the default state.

Parameters
data_dirPath to open or create database in

Definition at line 203 of file database.cpp.

◆ pop_block()

void scorum::chain::database::pop_block ( )

Removes the most recent block from the database and undoes any changes it made.

save the head block so we can recover its transactions

Definition at line 977 of file database.cpp.

◆ process_decline_voting_rights()

void scorum::chain::database::process_decline_voting_rights ( )

remove all current votes

Definition at line 1190 of file database.cpp.

◆ process_hardforks()

void scorum::chain::database::process_hardforks ( )
protected

Definition at line 2109 of file database.cpp.

◆ process_header_extensions()

void scorum::chain::database::process_header_extensions ( const signed_block next_block)
protected

Definition at line 1657 of file database.cpp.

◆ push_block()

bool scorum::chain::database::push_block ( const signed_block new_block,
uint32_t  skip = skip_nothing 
)

Push block "may fail" in which case every partial change is unwound. After push block is successful the block is appended to the chain database on disk.

Returns
true if we switched forks as a result of this push.

Definition at line 573 of file database.cpp.

◆ push_hf_operation()

void scorum::chain::database::push_hf_operation ( const operation op)
inline

Definition at line 1052 of file database.cpp.

◆ push_transaction()

void scorum::chain::database::push_transaction ( const signed_transaction trx,
uint32_t  skip = skip_nothing 
)

Attempts to push the transaction into the pending queue

When called to push a locally generated transaction, set the skip_block_size_check bit on the skip argument. This will allow the transaction to be pushed even if it causes the pending block size to exceed the maximum block size. Although the transaction will probably not propagate further now, as the peers are likely to have their pending queues full as well, it will be kept in the queue to be propagated later when a new block flushes out the pending queues.

Definition at line 751 of file database.cpp.

◆ push_virtual_operation()

void scorum::chain::database::push_virtual_operation ( const operation op)
inlinevirtual

◆ read_block_by_number()

optional< signed_block > scorum::chain::database::read_block_by_number ( uint32_t  num) const

Definition at line 491 of file database.cpp.

◆ reindex()

void scorum::chain::database::reindex ( const fc::path &  data_dir,
const fc::path &  shared_mem_dir,
uint64_t  shared_file_size,
uint32_t  skip_flags,
const genesis_state_type genesis_state 
)

Rebuild object graph from block history and open detabase.

This method may be called after or instead of database::open, and will rebuild the object graph by replaying blockchain history. When this method exits successfully, the database will be open.

Definition at line 284 of file database.cpp.

◆ set_flush_interval()

void scorum::chain::database::set_flush_interval ( uint32_t  flush_blocks)

Definition at line 1407 of file database.cpp.

◆ set_hardfork()

void scorum::chain::database::set_hardfork ( uint32_t  hardfork,
bool  process_now = true 
)

Definition at line 2137 of file database.cpp.

◆ set_initial_timestamp()

void scorum::chain::database::set_initial_timestamp ( const genesis_state_type genesis_state)

Definition at line 35 of file genesis.cpp.

◆ set_producing()

void scorum::chain::database::set_producing ( bool  p)
inlineprotected

Definition at line 349 of file database.hpp.

◆ show_free_memory()

void scorum::chain::database::show_free_memory ( bool  force)

Definition at line 1494 of file database.cpp.

◆ update_global_dynamic_data()

void scorum::chain::database::update_global_dynamic_data ( const signed_block b)
protected

Definition at line 1864 of file database.cpp.

◆ update_last_irreversible_block()

void scorum::chain::database::update_last_irreversible_block ( )
protected

Prior to voting taking over, we must be more conservative...

Definition at line 1947 of file database.cpp.

◆ update_signing_witness()

void scorum::chain::database::update_signing_witness ( const witness_object signing_witness,
const signed_block new_block 
)
protected

Definition at line 1938 of file database.cpp.

◆ validate_block_header()

const witness_object & scorum::chain::database::validate_block_header ( uint32_t  skip,
const signed_block next_block 
) const
protected

Steps involved in applying a new block

Definition at line 1816 of file database.cpp.

◆ validate_invariants()

void scorum::chain::database::validate_invariants ( ) const

Verifies all supply invariants check out

verify no witness has too many votes

Definition at line 2185 of file database.cpp.

◆ validate_transaction()

void scorum::chain::database::validate_transaction ( const signed_transaction trx)

This method validates transactions without adding it to the pending state.

Exceptions
ifan error occurs

Definition at line 1399 of file database.cpp.

◆ wipe()

void scorum::chain::database::wipe ( const fc::path &  data_dir,
const fc::path &  shared_mem_dir,
bool  include_blocks 
)

wipe Delete database from disk, and potentially the raw chain as well.

Parameters
include_blocksIf true, delete the raw chain as well as the database.

Will close the database before wiping. Database will be closed when this function returns.

Definition at line 338 of file database.cpp.

◆ witness_participation_rate()

uint32_t scorum::chain::database::witness_participation_rate ( ) const

Calculate the percent of block production slots that were missed in the past 128 blocks, not including the current block.

Definition at line 548 of file database.cpp.

Member Data Documentation

◆ _popped_tx

std::deque<signed_transaction> scorum::chain::database::_popped_tx

when popping a block, the transactions that were removed get cached here so they can be reapplied at the proper time

Definition at line 311 of file database.hpp.

◆ applied_block

fc::signal<void(const signed_block&)> scorum::chain::database::applied_block

This signal is emitted after all operations and virtual operation for a block have been applied but before the get_applied_operations() are cleared.

You may not yield from this callback because the blockchain is holding the write lock and may be in an "inconstant state" until after it is released.

Definition at line 221 of file database.hpp.

◆ on_applied_transaction

fc::signal<void(const signed_transaction&)> scorum::chain::database::on_applied_transaction

This signal is emitted any time a new transaction has been applied to the chain state.

Definition at line 239 of file database.hpp.

◆ on_pending_transaction

fc::signal<void(const signed_transaction&)> scorum::chain::database::on_pending_transaction

This signal is emitted any time a new transaction is added to the pending block state.

Definition at line 227 of file database.hpp.

◆ on_pre_apply_transaction

fc::signal<void(const signed_transaction&)> scorum::chain::database::on_pre_apply_transaction

This signla is emitted any time a new transaction is about to be applied to the chain state.

Definition at line 233 of file database.hpp.

◆ post_apply_operation

fc::signal<void(const operation_notification&)> scorum::chain::database::post_apply_operation

Definition at line 210 of file database.hpp.

◆ pre_applied_block

fc::signal<void(const signed_block&)> scorum::chain::database::pre_applied_block

Definition at line 211 of file database.hpp.

◆ pre_apply_operation

fc::signal<void(const operation_notification&)> scorum::chain::database::pre_apply_operation

This signal is emitted for plugins to process every operation before/after it has been fully applied.

Definition at line 209 of file database.hpp.


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