Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sub_chain_plugin.hpp
Go to the documentation of this file.
1#pragma once
7#include <string>
8#include <vector>
9#include <fc/bitutil.hpp> // for fc::endian_reverse_u32
10
11namespace sysio {
12
13using namespace appbase;
14
21
22class sub_chain_plugin : public appbase::plugin<sub_chain_plugin> {
23 public:
26 virtual ~sub_chain_plugin();
27
28 virtual void set_program_options(options_description&, options_description& cfg) override;
29 void plugin_initialize(const variables_map& options);
30 void plugin_startup();
31 void plugin_shutdown();
32
36
37 sysio::chain::checksum256_type calculate_s_root(const std::vector<sysio::chain::transaction>& transactions);
40
41 std::vector<sysio::chain::transaction> find_relevant_transactions(sysio::chain::controller& curr_chain);
43
44 private:
45 std::unique_ptr<sub_chain_plugin_impl> my;
46 };
47
48}
sysio::chain::account_name contract_name
sysio::chain::checksum256_type prev_s_id
std::vector< sysio::chain::action_name > action_names
sysio::chain::account_name & get_contract_name() const
void plugin_initialize(const variables_map &options)
virtual void set_program_options(options_description &, options_description &cfg) override
bool is_relevant_s_root_transaction(const sysio::chain::transaction &trx)
sysio::chain::checksum256_type & get_prev_s_id() const
void update_prev_s_id(const sysio::chain::checksum256_type &new_s_id)
uint32_t extract_s_block_number(const sysio::chain::checksum256_type &s_id)
sysio::chain::checksum256_type compute_curr_s_id(const sysio::chain::checksum256_type &curr_s_root)
std::vector< sysio::chain::transaction > find_relevant_transactions(sysio::chain::controller &curr_chain)
sysio::chain::checksum256_type calculate_s_root(const std::vector< sysio::chain::transaction > &transactions)
#define APPBASE_PLUGIN_REQUIRES(PLUGINS)
Definition plugin.hpp:11
unsigned int uint32_t
Definition stdint.h:126
Immutable except for fc::from_variant.
Definition name.hpp:43