Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::block_state Struct Reference

#include <block_state.hpp>

Inheritance diagram for sysio::chain::block_state:
Collaboration diagram for sysio::chain::block_state:

Public Member Functions

 block_state (const block_header_state &prev, signed_block_ptr b, const protocol_feature_set &pfs, const std::function< void(block_timestamp_type, const flat_set< digest_type > &, const vector< digest_type > &)> &validator, bool skip_validate_signee)
 
 block_state (pending_block_header_state &&cur, signed_block_ptr &&b, vector< transaction_metadata_ptr > &&trx_metas, const protocol_feature_set &pfs, const std::function< void(block_timestamp_type, const flat_set< digest_type > &, const vector< digest_type > &)> &validator, const signer_callback_type &signer)
 
 block_state ()=default
 
- Public Member Functions inherited from sysio::chain::block_header_state
 block_header_state ()=default
 
 block_header_state (detail::block_header_state_common &&base)
 
 block_header_state (legacy::snapshot_block_header_state_v2 &&snapshot)
 
pending_block_header_state next (block_timestamp_type when, uint16_t num_prev_blocks_to_confirm) const
 
block_header_state next (const signed_block_header &h, vector< signature_type > &&additional_signatures, const protocol_feature_set &pfs, const std::function< void(block_timestamp_type, const flat_set< digest_type > &, const vector< digest_type > &)> &validator, bool skip_validate_signee=false) const
 
bool has_pending_producers () const
 
uint32_t calc_dpos_last_irreversible (account_name producer_of_next_block) const
 
producer_authority get_scheduled_producer (block_timestamp_type t) const
 
const block_id_typeprev () const
 
digest_type sig_digest () const
 
void sign (const signer_callback_type &signer)
 
void verify_signee () const
 
const vector< digest_type > & get_new_protocol_feature_activations () const
 

Public Attributes

signed_block_ptr block
 
- Public Attributes inherited from sysio::chain::block_header_state
block_id_type id
 
signed_block_header header
 
detail::schedule_info pending_schedule
 
protocol_feature_activation_set_ptr activated_protocol_features
 
vector< signature_typeadditional_signatures
 
flat_multimap< uint16_t, block_header_extensionheader_exts
 
- Public Attributes inherited from sysio::chain::detail::block_header_state_common
uint32_t block_num = 0
 
uint32_t dpos_proposed_irreversible_blocknum = 0
 
uint32_t dpos_irreversible_blocknum = 0
 
producer_authority_schedule active_schedule
 
incremental_merkle blockroot_merkle
 
flat_map< account_name, uint32_tproducer_to_last_produced
 
flat_map< account_name, uint32_tproducer_to_last_implied_irb
 
block_signing_authority valid_block_signing_authority
 
vector< uint8_tconfirm_count
 

Friends

struct fc::reflector< block_state >
 
struct controller_impl
 
class fork_database
 
struct fork_database_impl
 
class unapplied_transaction_queue
 
struct pending_state
 
bool block_state_is_valid (const block_state &bs)
 

Detailed Description

Definition at line 10 of file block_state.hpp.

Constructor & Destructor Documentation

◆ block_state() [1/3]

sysio::chain::block_state::block_state ( const block_header_state & prev,
signed_block_ptr b,
const protocol_feature_set & pfs,
const std::function< void(block_timestamp_type, const flat_set< digest_type > &, const vector< digest_type > &)> & validator,
bool skip_validate_signee )

Definition at line 77 of file block_state.cpp.

85 :block_header_state( prev.next( *b, extract_additional_signatures(b, pfs, prev.activated_protocol_features), pfs, validator, skip_validate_signee ) )
86 ,block( std::move(b) )
87 {}
const block_id_type & prev() const

◆ block_state() [2/3]

sysio::chain::block_state::block_state ( pending_block_header_state && cur,
signed_block_ptr && b,
vector< transaction_metadata_ptr > && trx_metas,
const protocol_feature_set & pfs,
const std::function< void(block_timestamp_type, const flat_set< digest_type > &, const vector< digest_type > &)> & validator,
const signer_callback_type & signer )

Definition at line 89 of file block_state.cpp.

98 :block_header_state( inject_additional_signatures( std::move(cur), *b, pfs, validator, signer ) )
99 ,block( std::move(b) )
100 ,_pub_keys_recovered( true ) // called by produce_block so signature recovery of trxs must have been done
101 ,_cached_trxs( std::move(trx_metas) )
102 {}

◆ block_state() [3/3]

sysio::chain::block_state::block_state ( )
default

Friends And Related Symbol Documentation

◆ block_state_is_valid

bool block_state_is_valid ( const block_state & bs)
friend

Definition at line 24 of file fork_database.cpp.

24 {
25 return bs.is_valid();
26 }

◆ controller_impl

friend struct controller_impl
friend

Definition at line 38 of file block_state.hpp.

◆ fc::reflector< block_state >

friend struct fc::reflector< block_state >
friend

Definition at line 33 of file block_state.hpp.

◆ fork_database

friend class fork_database
friend

Definition at line 39 of file block_state.hpp.

◆ fork_database_impl

friend struct fork_database_impl
friend

Definition at line 40 of file block_state.hpp.

◆ pending_state

friend struct pending_state
friend

Definition at line 42 of file block_state.hpp.

◆ unapplied_transaction_queue

Definition at line 41 of file block_state.hpp.

Member Data Documentation

◆ block

signed_block_ptr sysio::chain::block_state::block

Definition at line 33 of file block_state.hpp.


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