| plebble
    | 
#include <daemon.h>


| Classes | |
| struct | apps | 
| struct | ev_track_t | 
| struct | neuralyzer_t | 
| struct | pools_t | 
| struct | reg | 
| struct | sysops_t | 
| struct | votes_t | 
| Public Types | |
| enum | evt_status_t { evt_unknown, evt_error, evt_wait_arrival, evt_calendar, evt_mempool, evt_consensus, evt_settled, evt_untracked, evt_num } | 
| typedef mezzanine | t | 
| typedef crypto::ec::keys | keys | 
| typedef us::gov::dfs::fileattr_t | fileattr_t | 
|  Public Types inherited from us::gov::engine::mezzanine | |
| typedef bgtask | b | 
|  Public Types inherited from us::gov::engine::evidence_processor | |
| typedef bgtask | t | 
| Public Member Functions | |
| daemon (const keys &) | |
| daemon (const keys &, const string &home, uint16_t port, uint16_t pport, uint8_t num_edges, uint8_t devices, int workers, const vector< pair< uint32_t, uint16_t >> &seed_nodes, const string &status_file) | |
| daemon (const daemon &)=delete | |
| daemon (daemon &&)=delete | |
| void | constructor () | 
| ~daemon () override | |
| daemon & | operator= (const daemon &)=delete | 
| void | add (app *app) | 
| int | clean_orphaned_blocks () | 
| void | list_apps (const string &prefix, ostream &os) const | 
| void | eat_diff (const diff::hash_t &voted_tip, diff *) | 
| bool | process_work (peer_t *c, datagram *d) | 
| bool | process_query (peer_t *c, datagram *d) | 
| bool | process_evidence (evidence *) | 
| bool | process_sysop_request (peer_t *c, datagram *d) | 
| bool | snapshot (diff::hash_t &) | 
| void | print_map (ostream &os) const | 
| bool | wait_for_secs_to (const seconds &s, uint64_t block_deadline) | 
| void | fsinfo (bool dot, ostream &os) const | 
| void | dbg_output () const | 
| void | vote_tip (const diff &b) | 
| void | dump (const string &prefix, ostream &os) const | 
| bool | import (const diff &b, const diff::hash_t &) | 
| bool | import_ (const diff &b, const diff::hash_t &) | 
| bool | ready_for_consensus () const | 
| diff::hash_t | get_last_delta_imported () const | 
| void | set_last_delta_imported (const diff::hash_t &, uint64_t id) | 
| void | set_last_delta_imported_ (const diff::hash_t &, uint64_t id) | 
| string | save_db (const string &dir) const | 
| void | save_db (ostream &os) | 
| void | load_db (const string &file) | 
| bool | load_db (istream &) | 
| void | logline (ostream &os) const | 
| void | list_files (ostream &os) const | 
| int | clean_unlisted_files () | 
| bool | get_prev (const diff::hash_t &h, diff::hash_t &prev) const override | 
| bool | patch_db (vector< diff::hash_t > &patches) override | 
| void | on_sync () override | 
| void | clear () override | 
| int | query_block (const diff::hash_t &hash) override | 
| diff::hash_t | save_db () | 
| bool | load_db (const base::hash_t &) | 
| void | run () | 
| void | load_head () | 
| void | wait (const seconds &t) const | 
| local_deltas * | create_local_deltas (uint64_t id) | 
| void | update_peers_state () | 
| void | clear_ () | 
| bool | shell_command (int app_id, istream &, ostream &) const | 
| void | save (const diff &bl) const | 
| void | files_to_keep (vector< pair< dfs::hash_t, uint32_t >> &) const | 
| void | update_dfs_index () | 
| void | update_dfs_index_delta () | 
| void | on_block_closure (uint64_t block_closure) override | 
| bool | ready_for_block_opening (uint64_t) const override | 
| string | uptime () const | 
| ko | start () override | 
| ko | wait_ready (const chrono::system_clock::time_point &deadline) const override | 
| void | stop () override | 
| void | join () override | 
| void | onwakeup () | 
| void | watch (ostream &os) const | 
| void | write_status (const string &line) const | 
| void | exec_evidence (const evidence &e) override | 
|  Public Member Functions inherited from us::gov::engine::syncd_t::actuator | |
| virtual | ~actuator () | 
|  Public Member Functions inherited from us::gov::engine::mezzanine | |
| mezzanine (daemon *) | |
|  Public Member Functions inherited from us::gov::bgtask | |
| bgtask () | |
| bgtask (function< void()> run, function< void()> onwakeup) | |
| virtual | ~bgtask () | 
| void | set_run_function (function< void()> r) | 
| void | wakeup () | 
| bool | isup () const | 
| bool | isdown () const | 
| bool | resumed () const | 
| void | run_ () | 
| void | reset () | 
| bool | reset_wait () | 
| bool | reset_resume () | 
| bool | is_active () const | 
| bgtask () | |
| bgtask (callback cb0) | |
| void | set_callback (callback r) | 
| ko | wait_ready (Date deadline) | 
| boolean | reset_wait () | 
| void | wakeup () | 
| boolean | reset_resume () | 
| boolean | isup () | 
| boolean | isdown () | 
| boolean | resumed () | 
| void | reset () | 
| boolean | is_active () | 
|  Public Member Functions inherited from us::gov::engine::evidence_processor | |
| evidence_processor () | |
| ~evidence_processor () | |
| void | process_evidences (uint64_t maxts) | 
| void | run () | 
| void | wait () | 
| void | wait_new_cycle () | 
| void | onwakeup () | 
| Static Public Member Functions | |
| static void | fsinfo (const string &home, bool dot, ostream &os) | 
| static bool | file_exists (const string &f) | 
| static char | block_type (istream &) | 
| static string | get_blocksdir (const string &govhome) | 
| static string | get_fsrootdir (const string &govhome) | 
| Public Attributes | |
| diff::hash_t | last_vote {0} | 
| diff::hash_t | last_consensus {0} | 
| condition_variable | cv_cyc | 
| string | home | 
| keys | id | 
| chrono::system_clock::time_point | running_since | 
| apps | apps_ | 
| auth::app * | auth_app | 
| us::gov::sys::app * | sys_app | 
| us::gov::cash::app * | cash_app | 
| networking | peerd | 
| sysops_t | sysops | 
| bool | sysop_allowed {false} | 
| bool | encrypt_protocol {false} | 
| local_deltas * | _local_deltas {0} | 
| votes_t | votes | 
| pools_t | pools | 
| syncd_t | syncd | 
| neuralyzer_t | neuralyzer | 
| diff::hash_t | last_delta_imported | 
| uint64_t | last_delta_imported_id | 
| mutex | mx_import | 
| uint16_t | depth {0} | 
| string | blocksdir | 
| reg | votes_timing | 
| reg | local_deltas_timing | 
| string | status_file | 
| ev_track_t | evt | 
| mutex | mx_dashboard | 
|  Public Attributes inherited from us::gov::engine::mezzanine | |
| daemon * | d | 
|  Public Attributes inherited from us::gov::engine::evidence_processor | |
| calendar_t | calendar | 
| Static Public Attributes | |
| static constexpr const char * | evt_status_str [evt_num] ={"unknown","error","wait_arrival","calendar","mempool","consensus","settled","untracked"} | 
|  Static Public Attributes inherited from us::gov::bgtask | |
| static const char * | KO_81021 | 
| static ko | KO_81021 =new ko("KO 81021 Ready status never reached.") | 
| Additional Inherited Members | |
|  Protected Attributes inherited from us::gov::bgtask | |
| atomic< short > | resume {0} | 
| thread * | th {nullptr} | 
| bool | active {false} | 
| function< void()> | run | 
| function< void()> | onwakeup | 
| mutex | mx_ready | 
| bool | ready {false} | 
| condition_variable | cv_ready | 
| AtomicInteger | resume =new AtomicInteger(0) | 
| Thread | th =null | 
| boolean | active =false | 
| callback | cb =null | 
| ReentrantLock | mx_ready = new ReentrantLock() | 
| boolean | ready =false | 
| Condition | cv_ready =mx_ready.newCondition() | 
| typedef mezzanine us::gov::engine::daemon::t | 
| us::gov::engine::daemon::daemon | ( | const keys & | ) | 
| us::gov::engine::daemon::daemon | ( | const keys & | , | 
| const string & | home, | ||
| uint16_t | port, | ||
| uint16_t | pport, | ||
| uint8_t | num_edges, | ||
| uint8_t | devices, | ||
| int | workers, | ||
| const vector< pair< uint32_t, uint16_t >> & | seed_nodes, | ||
| const string & | status_file | ||
| ) | 
| 
 | delete | 
| 
 | delete | 
| 
 | override | 
| void us::gov::engine::daemon::add | ( | app * | app | ) | 
| 
 | static | 
| int us::gov::engine::daemon::clean_orphaned_blocks | ( | ) | 
| int us::gov::engine::daemon::clean_unlisted_files | ( | ) | 
| 
 | overridevirtual | 
Implements us::gov::engine::syncd_t::actuator.
| void us::gov::engine::daemon::clear_ | ( | ) | 
| void us::gov::engine::daemon::constructor | ( | ) | 
| local_deltas* us::gov::engine::daemon::create_local_deltas | ( | uint64_t | id | ) | 
| void us::gov::engine::daemon::dbg_output | ( | ) | const | 
| void us::gov::engine::daemon::dump | ( | const string & | prefix, | 
| ostream & | os | ||
| ) | const | 
| void us::gov::engine::daemon::eat_diff | ( | const diff::hash_t & | voted_tip, | 
| diff * | |||
| ) | 
| 
 | overridevirtual | 
Implements us::gov::engine::evidence_processor.
| 
 | static | 
| void us::gov::engine::daemon::files_to_keep | ( | vector< pair< dfs::hash_t, uint32_t >> & | ) | const | 
| void us::gov::engine::daemon::fsinfo | ( | bool | dot, | 
| ostream & | os | ||
| ) | const | 
| 
 | static | 
| 
 | static | 
| 
 | static | 
| diff::hash_t us::gov::engine::daemon::get_last_delta_imported | ( | ) | const | 
| 
 | overridevirtual | 
Implements us::gov::engine::syncd_t::actuator.
| bool us::gov::engine::daemon::import | ( | const diff & | b, | 
| const diff::hash_t & | |||
| ) | 
| bool us::gov::engine::daemon::import_ | ( | const diff & | b, | 
| const diff::hash_t & | |||
| ) | 
| 
 | overridevirtual | 
Reimplemented from us::gov::bgtask.
| void us::gov::engine::daemon::list_apps | ( | const string & | prefix, | 
| ostream & | os | ||
| ) | const | 
| void us::gov::engine::daemon::list_files | ( | ostream & | os | ) | const | 
| bool us::gov::engine::daemon::load_db | ( | const base::hash_t & | ) | 
| void us::gov::engine::daemon::load_db | ( | const string & | file | ) | 
| bool us::gov::engine::daemon::load_db | ( | istream & | ) | 
| void us::gov::engine::daemon::load_head | ( | ) | 
| void us::gov::engine::daemon::logline | ( | ostream & | os | ) | const | 
| 
 | overridevirtual | 
Implements us::gov::engine::evidence_processor.
| 
 | overridevirtual | 
Implements us::gov::engine::syncd_t::actuator.
| void us::gov::engine::daemon::onwakeup | ( | ) | 
| 
 | overridevirtual | 
Implements us::gov::engine::syncd_t::actuator.
| void us::gov::engine::daemon::print_map | ( | ostream & | os | ) | const | 
| bool us::gov::engine::daemon::process_evidence | ( | evidence * | ) | 
| 
 | overridevirtual | 
Implements us::gov::engine::syncd_t::actuator.
| 
 | overridevirtual | 
Implements us::gov::engine::evidence_processor.
| bool us::gov::engine::daemon::ready_for_consensus | ( | ) | const | 
| void us::gov::engine::daemon::run | ( | ) | 
Reimplemented from us::gov::bgtask.
| void us::gov::engine::daemon::save | ( | const diff & | bl | ) | const | 
| diff::hash_t us::gov::engine::daemon::save_db | ( | ) | 
| string us::gov::engine::daemon::save_db | ( | const string & | dir | ) | const | 
| void us::gov::engine::daemon::save_db | ( | ostream & | os | ) | 
| void us::gov::engine::daemon::set_last_delta_imported | ( | const diff::hash_t & | , | 
| uint64_t | id | ||
| ) | 
| void us::gov::engine::daemon::set_last_delta_imported_ | ( | const diff::hash_t & | , | 
| uint64_t | id | ||
| ) | 
| bool us::gov::engine::daemon::shell_command | ( | int | app_id, | 
| istream & | , | ||
| ostream & | |||
| ) | const | 
| bool us::gov::engine::daemon::snapshot | ( | diff::hash_t & | ) | 
| 
 | overridevirtual | 
Reimplemented from us::gov::bgtask.
| 
 | overridevirtual | 
Reimplemented from us::gov::bgtask.
| void us::gov::engine::daemon::update_dfs_index | ( | ) | 
| void us::gov::engine::daemon::update_dfs_index_delta | ( | ) | 
| void us::gov::engine::daemon::update_peers_state | ( | ) | 
| string us::gov::engine::daemon::uptime | ( | ) | const | 
| void us::gov::engine::daemon::vote_tip | ( | const diff & | b | ) | 
| void us::gov::engine::daemon::wait | ( | const seconds & | t | ) | const | 
| bool us::gov::engine::daemon::wait_for_secs_to | ( | const seconds & | s, | 
| uint64_t | block_deadline | ||
| ) | 
| 
 | overridevirtual | 
Reimplemented from us::gov::bgtask.
| void us::gov::engine::daemon::watch | ( | ostream & | os | ) | const | 
| void us::gov::engine::daemon::write_status | ( | const string & | line | ) | const | 
| local_deltas* us::gov::engine::daemon::_local_deltas {0} | 
| apps us::gov::engine::daemon::apps_ | 
| auth::app* us::gov::engine::daemon::auth_app | 
| string us::gov::engine::daemon::blocksdir | 
| us::gov::cash::app* us::gov::engine::daemon::cash_app | 
| condition_variable us::gov::engine::daemon::cv_cyc | 
| uint16_t us::gov::engine::daemon::depth {0} | 
| bool us::gov::engine::daemon::encrypt_protocol {false} | 
| ev_track_t us::gov::engine::daemon::evt | 
| 
 | staticconstexpr | 
| string us::gov::engine::daemon::home | 
| keys us::gov::engine::daemon::id | 
| diff::hash_t us::gov::engine::daemon::last_consensus {0} | 
| diff::hash_t us::gov::engine::daemon::last_delta_imported | 
| uint64_t us::gov::engine::daemon::last_delta_imported_id | 
| diff::hash_t us::gov::engine::daemon::last_vote {0} | 
| reg us::gov::engine::daemon::local_deltas_timing | 
| 
 | mutable | 
| 
 | mutable | 
| neuralyzer_t us::gov::engine::daemon::neuralyzer | 
| networking us::gov::engine::daemon::peerd | 
| pools_t us::gov::engine::daemon::pools | 
| chrono::system_clock::time_point us::gov::engine::daemon::running_since | 
| string us::gov::engine::daemon::status_file | 
| syncd_t us::gov::engine::daemon::syncd | 
| us::gov::sys::app* us::gov::engine::daemon::sys_app | 
| bool us::gov::engine::daemon::sysop_allowed {false} | 
| sysops_t us::gov::engine::daemon::sysops | 
| votes_t us::gov::engine::daemon::votes | 
| reg us::gov::engine::daemon::votes_timing |