Разработчикам Статистика Баунти Документация Партнеры Github
Public Member Functions | Public Attributes | List of all members
golos::plugin::debug_node::debug_node_plugin Class Reference

#include <debug_node_plugin.hpp>

Inheritance diagram for golos::plugin::debug_node::debug_node_plugin:
golos::application::plugin golos::application::abstract_plugin

Public Member Functions

 debug_node_plugin (application *app)
virtual ~debug_node_plugin ()
virtual std::string plugin_name () const override
virtual void plugin_initialize (const boost::program_options::variables_map &options) override
 Perform early startup routines and register plugin indexes, callbacks, etc. More...
virtual void plugin_set_program_options (boost::program_options::options_description &cli, boost::program_options::options_description &cfg) override
 Fill in command line parameters used by the plugin. More...
virtual void plugin_startup () override
 Begin normal runtime operations. More...
virtual void plugin_shutdown () override
 Cleanly shut down the plugin. More...
template<typename Lambda >
void debug_update (Lambda &&callback, uint32_t skip=golos::chain::database::skip_nothing)
uint32_t debug_generate_blocks (const std::string &debug_key, uint32_t count, uint32_t skip=golos::chain::database::skip_nothing, uint32_t miss_blocks=0, private_key_storage *key_storage=nullptr)
uint32_t debug_generate_blocks_until (const std::string &debug_key, const fc::time_point_sec &head_block_time, bool generate_sparsely, uint32_t skip=golos::chain::database::skip_nothing, private_key_storage *key_storage=nullptr)
void set_json_object_stream (const std::string &filename)
void flush_json_object_stream ()
void save_debug_updates (fc::mutable_variant_object &target)
void load_debug_updates (const fc::variant_object &target)
void debug_mine_work (chain::pow2 &work, uint32_t summary_target)
- Public Member Functions inherited from golos::application::plugin
 plugin (application *app)
virtual ~plugin () override
chain::databasedatabase ()
applicationapp () const
- Public Member Functions inherited from golos::application::abstract_plugin
virtual ~abstract_plugin ()

Public Attributes

bool logging = true

Additional Inherited Members

- Protected Member Functions inherited from golos::application::plugin
network::node & p2p_node ()

Detailed Description

Definition at line 49 of file debug_node_plugin.hpp.

Constructor & Destructor Documentation

◆ debug_node_plugin()

golos::plugin::debug_node::debug_node_plugin::debug_node_plugin ( application app)

Definition at line 46 of file debug_node_plugin.cpp.

◆ ~debug_node_plugin()

golos::plugin::debug_node::debug_node_plugin::~debug_node_plugin ( )

Definition at line 51 of file debug_node_plugin.cpp.

Member Function Documentation

◆ debug_generate_blocks()

uint32_t golos::plugin::debug_node::debug_node_plugin::debug_generate_blocks ( const std::string &  debug_key,
uint32_t  count,
uint32_t  skip = golos::chain::database::skip_nothing,
uint32_t  miss_blocks = 0,
private_key_storage key_storage = nullptr 

Definition at line 268 of file debug_node_plugin.cpp.

◆ debug_generate_blocks_until()

uint32_t golos::plugin::debug_node::debug_node_plugin::debug_generate_blocks_until ( const std::string &  debug_key,
const fc::time_point_sec &  head_block_time,
bool  generate_sparsely,
uint32_t  skip = golos::chain::database::skip_nothing,
private_key_storage key_storage = nullptr 

Definition at line 327 of file debug_node_plugin.cpp.

◆ debug_mine_work()

void golos::plugin::debug_node::debug_node_plugin::debug_mine_work ( chain::pow2 &  work,
uint32_t  summary_target 

Definition at line 72 of file debug_node_plugin.cpp.

◆ debug_update()

template<typename Lambda >
void golos::plugin::debug_node::debug_node_plugin::debug_update ( Lambda &&  callback,
uint32_t  skip = golos::chain::database::skip_nothing 

Definition at line 68 of file debug_node_plugin.hpp.

◆ flush_json_object_stream()

void golos::plugin::debug_node::debug_node_plugin::flush_json_object_stream ( )

◆ load_debug_updates()

void golos::plugin::debug_node::debug_node_plugin::load_debug_updates ( const fc::variant_object &  target)

◆ plugin_initialize()

void golos::plugin::debug_node::debug_node_plugin::plugin_initialize ( const boost::program_options::variables_map &  options)

Perform early startup routines and register plugin indexes, callbacks, etc.

Plugins MUST supply a method initialize() which will be called early in the application startup. This method should contain early setup code such as initializing variables, adding indexes to the database, registering callback methods from the database, adding APIs, etc., as well as applying any options in the options map

This method is called BEFORE the database is open, therefore any routines which require any chain state MUST NOT be called by this method. These routines should be performed in startup() instead.

optionsThe options passed to the application, via configuration files or command line

Reimplemented from golos::application::plugin.

Definition at line 142 of file debug_node_plugin.cpp.

◆ plugin_name()

std::string golos::plugin::debug_node::debug_node_plugin::plugin_name ( ) const

Reimplemented from golos::application::plugin.

Definition at line 130 of file debug_node_plugin.cpp.

◆ plugin_set_program_options()

void golos::plugin::debug_node::debug_node_plugin::plugin_set_program_options ( boost::program_options::options_description &  command_line_options,
boost::program_options::options_description &  config_file_options 

Fill in command line parameters used by the plugin.

command_line_optionsAll options this plugin supports taking on the command-line
config_file_optionsAll options this plugin supports storing in a configuration file

This method populates its arguments with any command-line and configuration file options the plugin supports. If a plugin does not need these options, it may simply provide an empty implementation of this method.

Reimplemented from golos::application::plugin.

Definition at line 134 of file debug_node_plugin.cpp.

◆ plugin_shutdown()

void golos::plugin::debug_node::debug_node_plugin::plugin_shutdown ( )

Cleanly shut down the plugin.

This is called to request a clean shutdown (e.g. due to SIGINT or SIGTERM).

Reimplemented from golos::application::plugin.

Definition at line 418 of file debug_node_plugin.cpp.

◆ plugin_startup()

void golos::plugin::debug_node::debug_node_plugin::plugin_startup ( )

Begin normal runtime operations.

Plugins MUST supply a method startup() which will be called at the end of application startup. This method should contain code which schedules any tasks, or requires chain state.

Reimplemented from golos::application::plugin.

Definition at line 159 of file debug_node_plugin.cpp.

◆ save_debug_updates()

void golos::plugin::debug_node::debug_node_plugin::save_debug_updates ( fc::mutable_variant_object &  target)

◆ set_json_object_stream()

void golos::plugin::debug_node::debug_node_plugin::set_json_object_stream ( const std::string &  filename)

Member Data Documentation

◆ logging

bool golos::plugin::debug_node::debug_node_plugin::logging = true

Definition at line 117 of file debug_node_plugin.hpp.

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