Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::test_control_plugin_impl Class Reference

Public Member Functions

 test_control_plugin_impl (chain::controller &c)
 
void connect ()
 
void disconnect ()
 
void kill_on_lib (account_name prod, uint32_t where_in_seq)
 
void kill_on_head (account_name prod, uint32_t where_in_seq)
 

Detailed Description

Definition at line 9 of file test_control_plugin.cpp.

Constructor & Destructor Documentation

◆ test_control_plugin_impl()

sysio::test_control_plugin_impl::test_control_plugin_impl ( chain::controller & c)
inlineexplicit

Definition at line 11 of file test_control_plugin.cpp.

11: _chain(c) {}

Member Function Documentation

◆ connect()

void sysio::test_control_plugin_impl::connect ( )

Definition at line 33 of file test_control_plugin.cpp.

33 {
34 _irreversible_block_connection.emplace(
35 _chain.irreversible_block.connect( [&]( const chain::block_state_ptr& bs ) {
36 applied_irreversible_block( bs );
37 } ));
38 _accepted_block_connection =
39 _chain.accepted_block.connect( [&]( const chain::block_state_ptr& bs ) {
40 accepted_block( bs );
41 } );
42}
signal< void(const block_state_ptr &)> accepted_block
signal< void(const block_state_ptr &)> irreversible_block
std::shared_ptr< block_state > block_state_ptr

◆ disconnect()

void sysio::test_control_plugin_impl::disconnect ( )

Definition at line 44 of file test_control_plugin.cpp.

44 {
45 _accepted_block_connection.reset();
46 _irreversible_block_connection.reset();
47}

◆ kill_on_head()

void sysio::test_control_plugin_impl::kill_on_head ( account_name prod,
uint32_t where_in_seq )

Definition at line 98 of file test_control_plugin.cpp.

98 {
99 _track_lib = false;
100 _producer = prod;
101 _where_in_sequence = where_in_seq;
102 _clean_producer_sequence = false;
103 _started_production_round = false;
104 _track_head = true;
105}

◆ kill_on_lib()

void sysio::test_control_plugin_impl::kill_on_lib ( account_name prod,
uint32_t where_in_seq )

Definition at line 89 of file test_control_plugin.cpp.

89 {
90 _track_head = false;
91 _producer = prod;
92 _where_in_sequence = where_in_seq;
93 _clean_producer_sequence = false;
94 _started_production_round = false;
95 _track_lib = true;
96}

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