Wire Sysio Wire Sysion 1.0.0
|
#include <resource_limits.hpp>
Public Member Functions | |
resource_limits_manager (chainbase::database &db, std::function< deep_mind_handler *()> get_deep_mind_logger) | |
void | add_indices () |
void | initialize_database () |
void | add_to_snapshot (const snapshot_writer_ptr &snapshot) const |
void | read_from_snapshot (const snapshot_reader_ptr &snapshot) |
void | initialize_account (const account_name &account) |
void | set_block_parameters (const elastic_limit_parameters &cpu_limit_parameters, const elastic_limit_parameters &net_limit_parameters) |
void | update_account_usage (const flat_set< account_name > &accounts, uint32_t ordinal) |
void | add_transaction_usage (const flat_set< account_name > &accounts, uint64_t cpu_usage, uint64_t net_usage, uint32_t ordinal) |
void | add_pending_ram_usage (const account_name account, int64_t ram_delta) |
void | verify_account_ram_usage (const account_name accunt) const |
bool | set_account_limits (const account_name &account, int64_t ram_bytes, int64_t net_weight, int64_t cpu_weight) |
set_account_limits returns true if new ram_bytes limit is more restrictive than the previously set one | |
void | get_account_limits (const account_name &account, int64_t &ram_bytes, int64_t &net_weight, int64_t &cpu_weight) const |
bool | is_unlimited_cpu (const account_name &account) const |
void | process_account_limit_updates () |
void | process_block_usage (uint32_t block_num) |
uint64_t | get_total_cpu_weight () const |
uint64_t | get_total_net_weight () const |
uint64_t | get_virtual_block_cpu_limit () const |
uint64_t | get_virtual_block_net_limit () const |
uint64_t | get_block_cpu_limit () const |
uint64_t | get_block_net_limit () const |
std::pair< int64_t, bool > | get_account_cpu_limit (const account_name &name, uint32_t greylist_limit=config::maximum_elastic_resource_multiplier) const |
std::pair< int64_t, bool > | get_account_net_limit (const account_name &name, uint32_t greylist_limit=config::maximum_elastic_resource_multiplier) const |
std::pair< account_resource_limit, bool > | get_account_cpu_limit_ex (const account_name &name, uint32_t greylist_limit=config::maximum_elastic_resource_multiplier) const |
std::pair< account_resource_limit, bool > | get_account_net_limit_ex (const account_name &name, uint32_t greylist_limit=config::maximum_elastic_resource_multiplier) const |
int64_t | get_account_ram_usage (const account_name &name) const |
Definition at line 61 of file resource_limits.hpp.
|
inlineexplicit |
Definition at line 64 of file resource_limits.hpp.
void sysio::chain::resource_limits::resource_limits_manager::add_indices | ( | ) |
Definition at line 51 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::add_pending_ram_usage | ( | const account_name | account, |
int64_t | ram_delta ) |
Definition at line 206 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::add_to_snapshot | ( | const snapshot_writer_ptr & | snapshot | ) | const |
Definition at line 73 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::add_transaction_usage | ( | const flat_set< account_name > & | accounts, |
uint64_t | cpu_usage, | ||
uint64_t | net_usage, | ||
uint32_t | ordinal ) |
Definition at line 136 of file resource_limits.cpp.
std::pair< int64_t, bool > sysio::chain::resource_limits::resource_limits_manager::get_account_cpu_limit | ( | const account_name & | name, |
uint32_t | greylist_limit = config::maximum_elastic_resource_multiplier ) const |
Definition at line 416 of file resource_limits.cpp.
std::pair< account_resource_limit, bool > sysio::chain::resource_limits::resource_limits_manager::get_account_cpu_limit_ex | ( | const account_name & | name, |
uint32_t | greylist_limit = config::maximum_elastic_resource_multiplier ) const |
Definition at line 421 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::get_account_limits | ( | const account_name & | account, |
int64_t & | ram_bytes, | ||
int64_t & | net_weight, | ||
int64_t & | cpu_weight ) const |
Definition at line 298 of file resource_limits.cpp.
std::pair< int64_t, bool > sysio::chain::resource_limits::resource_limits_manager::get_account_net_limit | ( | const account_name & | name, |
uint32_t | greylist_limit = config::maximum_elastic_resource_multiplier ) const |
Definition at line 468 of file resource_limits.cpp.
std::pair< account_resource_limit, bool > sysio::chain::resource_limits::resource_limits_manager::get_account_net_limit_ex | ( | const account_name & | name, |
uint32_t | greylist_limit = config::maximum_elastic_resource_multiplier ) const |
Definition at line 473 of file resource_limits.cpp.
int64_t sysio::chain::resource_limits::resource_limits_manager::get_account_ram_usage | ( | const account_name & | name | ) | const |
Definition at line 239 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_block_cpu_limit | ( | ) | const |
Definition at line 404 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_block_net_limit | ( | ) | const |
Definition at line 410 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_total_cpu_weight | ( | ) | const |
Definition at line 384 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_total_net_weight | ( | ) | const |
Definition at line 389 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_virtual_block_cpu_limit | ( | ) | const |
Definition at line 394 of file resource_limits.cpp.
uint64_t sysio::chain::resource_limits::resource_limits_manager::get_virtual_block_net_limit | ( | ) | const |
Definition at line 399 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::initialize_account | ( | const account_name & | account | ) |
Definition at line 96 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::initialize_database | ( | ) |
Definition at line 55 of file resource_limits.cpp.
bool sysio::chain::resource_limits::resource_limits_manager::is_unlimited_cpu | ( | const account_name & | account | ) | const |
Definition at line 312 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::process_account_limit_updates | ( | ) |
Definition at line 320 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::process_block_usage | ( | uint32_t | block_num | ) |
Definition at line 363 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::read_from_snapshot | ( | const snapshot_reader_ptr & | snapshot | ) |
Definition at line 83 of file resource_limits.cpp.
bool sysio::chain::resource_limits::resource_limits_manager::set_account_limits | ( | const account_name & | account, |
int64_t | ram_bytes, | ||
int64_t | net_weight, | ||
int64_t | cpu_weight ) |
Definition at line 244 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::set_block_parameters | ( | const elastic_limit_parameters & | cpu_limit_parameters, |
const elastic_limit_parameters & | net_limit_parameters ) |
Definition at line 109 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::update_account_usage | ( | const flat_set< account_name > & | accounts, |
uint32_t | ordinal ) |
Definition at line 125 of file resource_limits.cpp.
void sysio::chain::resource_limits::resource_limits_manager::verify_account_ram_usage | ( | const account_name | accunt | ) | const |
Definition at line 227 of file resource_limits.cpp.