|
Electroneum
|
Various Tools. More...
Namespaces | |
| base58 | |
| detail | |
| dns_utils | |
| error | |
| wallet_rpc | |
Typedefs | |
| typedef class scoped_ptr< ub_result, ub_resolve_free > | ub_result_ptr |
| typedef std::shared_ptr< download_thread_control > | download_async_handle |
Enumerations | |
| enum | { EVARINT_OVERFLOW = -1, EVARINT_REPRESENT = -2 } |
| Error codes for varint. More... | |
Functions | |
| template<typename F > | |
| void | apply_permutation (std::vector< size_t > permutation, const F &swap) |
| template<typename T > | |
| void | apply_permutation (const std::vector< size_t > &permutation, std::vector< T > &v) |
| template<class t_object > | |
| bool | serialize_obj_to_file (t_object &obj, const std::string &file_path) |
| template<class t_object > | |
| bool | unserialize_obj_from_file (t_object &obj, const std::string &file_path) |
| uint64_t | combinations_count (uint32_t k, uint32_t n) |
| boost::optional< std::string > | ipv4_to_string (const char *src, size_t len) |
| boost::optional< std::string > | ipv6_to_string (const char *src, size_t len) |
| boost::optional< std::string > | txt_to_string (const char *src, size_t len) |
| bool | download (const std::string &path, const std::string &url, std::function< bool(const std::string &, const std::string &, size_t, ssize_t)> cb) |
| download_async_handle | download_async (const std::string &path, const std::string &url, std::function< void(const std::string &, const std::string &, bool)> result, std::function< bool(const std::string &, const std::string &, size_t, ssize_t)> progress) |
| bool | download_finished (const download_async_handle &control) |
| bool | download_error (const download_async_handle &control) |
| bool | download_wait (const download_async_handle &control) |
| bool | download_cancel (const download_async_handle &control) |
| uint64_t | get_tick_count () |
| uint64_t | ticks_to_ns (uint64_t ticks) |
| void | set_performance_timer_log_level (el::Level level) |
| uint64_t | get_ticks_per_ns () |
| uint32_t | make_pruning_seed (uint32_t stripe, uint32_t log_stripes) |
| bool | has_unpruned_block (uint64_t block_height, uint64_t blockchain_height, uint32_t pruning_seed) |
| uint32_t | get_pruning_stripe (uint64_t block_height, uint64_t blockchain_height, uint32_t log_stripes) |
| uint32_t | get_pruning_seed (uint64_t block_height, uint64_t blockchain_height, uint32_t log_stripes) |
| uint64_t | get_next_unpruned_block_height (uint64_t block_height, uint64_t blockchain_height, uint32_t pruning_seed) |
| uint64_t | get_next_pruned_block_height (uint64_t block_height, uint64_t blockchain_height, uint32_t pruning_seed) |
| uint32_t | get_random_stripe () |
| constexpr uint32_t | get_pruning_log_stripes (uint32_t pruning_seed) |
| uint32_t | get_pruning_stripe (uint32_t pruning_seed) |
| scoped_message_writer | success_msg_writer (bool color=true) |
| scoped_message_writer | msg_writer (epee::console_colors color=epee::console_color_default) |
| scoped_message_writer | fail_msg_writer () |
| int | spawn (const char *filename, const std::vector< std::string > &args, bool wait) |
| void | set_stack_trace_log (const std::string &log) |
| void | log_stack_trace (const char *msg) |
| bool | check_updates (const std::string &software, const std::string &buildtag, std::string &version, std::string &hash) |
| std::string | get_update_url (const std::string &software, const std::string &subdir, const std::string &buildtag, const std::string &version, bool user) |
| std::string | get_nix_version_display_string () |
| std::string | get_os_version_string () |
| Returns the OS version string. More... | |
| std::string | get_default_data_dir () |
| Returns the default data directory. More... | |
| bool | create_directories_if_necessary (const std::string &path) |
| creates directories for a path More... | |
| std::error_code | replace_file (const std::string &old_name, const std::string &new_name) |
| std::rename wrapper for nix and something strange for windows. More... | |
| bool | sanitize_locale () |
| bool | disable_core_dumps () |
| ssize_t | get_lockable_memory () |
| bool | on_startup () |
| void | set_strict_default_file_permissions (bool strict) |
| boost::optional< bool > | is_hdd (const char *file_path) |
| void | set_max_concurrency (unsigned n) |
| unsigned | get_max_concurrency () |
| bool | is_local_address (const std::string &address) |
| int | vercmp (const char *v0, const char *v1) |
| bool | sha256sum (const uint8_t *data, size_t len, crypto::hash &hash) |
| bool | sha256sum (const std::string &filename, crypto::hash &hash) |
| boost::optional< std::pair< uint32_t, uint32_t > > | parse_subaddress_lookahead (const std::string &str) |
| int | display_simple_progress_spinner (int x) |
| std::string | glob_to_regex (const std::string &val) |
| void | closefrom (int fd) |
| std::string | get_human_readable_timestamp (uint64_t ts) |
| std::string | get_human_readable_bytes (uint64_t bytes) |
| template<typename OutputIt , typename T > | |
| std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value, void >::type | write_varint (OutputIt &&dest, T i) |
| writes a varint to a stream. More... | |
| template<typename T > | |
| std::string | get_varint_data (const T &v) |
| Returns the string that represents the varint. More... | |
Variables | |
| el::Level | performance_timer_log_level = el::Level::Info |
| const size_t | MAX_SPLIT_ATTEMPTS = 30 |
Various Tools.
| typedef std::shared_ptr<download_thread_control> tools::download_async_handle |
Definition at line 36 of file download.h.
| typedef class scoped_ptr< ub_result, ub_resolve_free > tools::ub_result_ptr |
Definition at line 220 of file dns_utils.cpp.
| anonymous enum |
Error codes for varint.
| Enumerator | |
|---|---|
| EVARINT_OVERFLOW | |
| EVARINT_REPRESENT | |
Definition at line 58 of file varint.h.
| void tools::apply_permutation | ( | std::vector< size_t > | permutation, |
| const F & | swap | ||
| ) |
Definition at line 43 of file apply_permutation.h.

| void tools::apply_permutation | ( | const std::vector< size_t > & | permutation, |
| std::vector< T > & | v | ||
| ) |
Definition at line 64 of file apply_permutation.h.

| bool tools::check_updates | ( | const std::string & | software, |
| const std::string & | buildtag, | ||
| std::string & | version, | ||
| std::string & | hash | ||
| ) |
Definition at line 41 of file updates.cpp.


| void tools::closefrom | ( | int | fd | ) |
| bool tools::create_directories_if_necessary | ( | const std::string & | path | ) |
| bool tools::disable_core_dumps | ( | ) |
| bool tools::download | ( | const std::string & | path, |
| const std::string & | url, | ||
| std::function< bool(const std::string &, const std::string &, size_t, ssize_t)> | cb | ||
| ) |
Definition at line 258 of file download.cpp.


| download_async_handle tools::download_async | ( | const std::string & | path, |
| const std::string & | url, | ||
| std::function< void(const std::string &, const std::string &, bool)> | result, | ||
| std::function< bool(const std::string &, const std::string &, size_t, ssize_t)> | progress | ||
| ) |
Definition at line 266 of file download.cpp.

| bool tools::download_cancel | ( | const download_async_handle & | control | ) |
Definition at line 299 of file download.cpp.

| bool tools::download_error | ( | const download_async_handle & | control | ) |
Definition at line 280 of file download.cpp.
| bool tools::download_finished | ( | const download_async_handle & | control | ) |
Definition at line 273 of file download.cpp.
| bool tools::download_wait | ( | const download_async_handle & | control | ) |
Definition at line 287 of file download.cpp.

|
inline |
Definition at line 131 of file scoped_message_writer.h.
| std::string tools::get_default_data_dir | ( | ) |
Returns the default data directory.
Windows < Vista: C:\Documents and Settings\Username\Application Data\CRYPTONOTE_NAME
Windows >= Vista: C:\Users\Username\AppData\Roaming\CRYPTONOTE_NAME
Mac: ~/Library/Application Support/CRYPTONOTE_NAME
Unix: ~/.CRYPTONOTE_NAME
Definition at line 600 of file util.cpp.

| std::string tools::get_human_readable_bytes | ( | uint64_t | bytes | ) |
Definition at line 1089 of file util.cpp.

| std::string tools::get_human_readable_timestamp | ( | uint64_t | ts | ) |
Definition at line 1077 of file util.cpp.


| ssize_t tools::get_lockable_memory | ( | ) |
| unsigned tools::get_max_concurrency | ( | ) |
| uint64_t tools::get_next_pruned_block_height | ( | uint64_t | block_height, |
| uint64_t | blockchain_height, | ||
| uint32_t | pruning_seed | ||
| ) |
Definition at line 93 of file pruning.cpp.


| uint64_t tools::get_next_unpruned_block_height | ( | uint64_t | block_height, |
| uint64_t | blockchain_height, | ||
| uint32_t | pruning_seed | ||
| ) |
Definition at line 69 of file pruning.cpp.


| std::string tools::get_nix_version_display_string | ( | ) |
| std::string tools::get_os_version_string | ( | ) |
Returns the OS version string.
This is a wrapper around the primitives get_windows_version_display_string() and get_nix_version_display_string()
Definition at line 566 of file util.cpp.


| uint32_t tools::get_pruning_seed | ( | uint64_t | block_height, |
| uint64_t | blockchain_height, | ||
| uint32_t | log_stripes | ||
| ) |
Definition at line 61 of file pruning.cpp.


| uint32_t tools::get_pruning_stripe | ( | uint64_t | block_height, |
| uint64_t | blockchain_height, | ||
| uint32_t | log_stripes | ||
| ) |
Definition at line 54 of file pruning.cpp.

| uint32_t tools::get_random_stripe | ( | ) |
Definition at line 110 of file pruning.cpp.
| uint64_t tools::get_tick_count | ( | ) |
Definition at line 46 of file perf_timer.cpp.


| uint64_t tools::get_ticks_per_ns | ( | ) |
| std::string tools::get_update_url | ( | const std::string & | software, |
| const std::string & | subdir, | ||
| const std::string & | buildtag, | ||
| const std::string & | version, | ||
| bool | user | ||
| ) |
Definition at line 101 of file updates.cpp.

| std::string tools::get_varint_data | ( | const T & | v | ) |
Returns the string that represents the varint.
Definition at line 85 of file varint.h.


| std::string tools::glob_to_regex | ( | const std::string & | val | ) |
| bool tools::has_unpruned_block | ( | uint64_t | block_height, |
| uint64_t | blockchain_height, | ||
| uint32_t | pruning_seed | ||
| ) |
Definition at line 44 of file pruning.cpp.


| boost::optional<std::string> tools::ipv4_to_string | ( | const char * | src, |
| size_t | len | ||
| ) |
| boost::optional<std::string> tools::ipv6_to_string | ( | const char * | src, |
| size_t | len | ||
| ) |
| boost::optional< bool > tools::is_hdd | ( | const char * | file_path | ) |
| bool tools::is_local_address | ( | const std::string & | address | ) |
Definition at line 874 of file util.cpp.


| void tools::log_stack_trace | ( | const char * | msg | ) |
Definition at line 121 of file stack_trace.cpp.
Definition at line 37 of file pruning.cpp.

|
inline |
Definition at line 126 of file scoped_message_writer.h.

| bool tools::on_startup | ( | ) |
Definition at line 778 of file util.cpp.


| boost::optional< std::pair< uint32_t, uint32_t > > tools::parse_subaddress_lookahead | ( | const std::string & | str | ) |
Definition at line 977 of file util.cpp.


| std::error_code tools::replace_file | ( | const std::string & | old_name, |
| const std::string & | new_name | ||
| ) |
| bool tools::serialize_obj_to_file | ( | t_object & | obj, |
| const std::string & | file_path | ||
| ) |
Definition at line 43 of file boost_serialization_helper.h.
| void tools::set_max_concurrency | ( | unsigned | n | ) |
| void tools::set_performance_timer_log_level | ( | el::Level | level | ) |
Definition at line 96 of file perf_timer.cpp.

| void tools::set_stack_trace_log | ( | const std::string & | log | ) |
| void tools::set_strict_default_file_permissions | ( | bool | strict | ) |
| bool tools::sha256sum | ( | const uint8_t * | data, |
| size_t | len, | ||
| crypto::hash & | hash | ||
| ) |
| bool tools::sha256sum | ( | const std::string & | filename, |
| crypto::hash & | hash | ||
| ) |
Definition at line 945 of file util.cpp.

| int tools::spawn | ( | const char * | filename, |
| const std::vector< std::string > & | args, | ||
| bool | wait | ||
| ) |
|
inline |
Definition at line 121 of file scoped_message_writer.h.

| boost::optional<std::string> tools::txt_to_string | ( | const char * | src, |
| size_t | len | ||
| ) |
| bool tools::unserialize_obj_from_file | ( | t_object & | obj, |
| const std::string & | file_path | ||
| ) |
Definition at line 97 of file boost_serialization_helper.h.

| int tools::vercmp | ( | const char * | v0, |
| const char * | v1 | ||
| ) |
| std::enable_if<std::is_integral<T>::value && std::is_unsigned<T>::value, void>::type tools::write_varint | ( | OutputIt && | dest, |
| T | i | ||
| ) |
| const size_t tools::MAX_SPLIT_ATTEMPTS = 30 |
Definition at line 991 of file wallet2.cpp.
| el::Level tools::performance_timer_log_level = el::Level::Info |
Definition at line 92 of file perf_timer.cpp.