Scorum
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
scorum::witness::detail::witness_plugin_impl Class Reference

Public Member Functions

 witness_plugin_impl (witness_plugin &plugin)
 
void plugin_initialize ()
 
void pre_transaction (const signed_transaction &trx)
 
void pre_operation (const operation_notification &note)
 
void on_block (const signed_block &b)
 
void update_account_bandwidth (const account_object &a, uint32_t trx_size, const bandwidth_type type)
 

Public Attributes

witness_plugin_self
 

Detailed Description

Definition at line 58 of file witness_plugin.cpp.

Constructor & Destructor Documentation

◆ witness_plugin_impl()

scorum::witness::detail::witness_plugin_impl::witness_plugin_impl ( witness_plugin plugin)
inline

Definition at line 61 of file witness_plugin.cpp.

Member Function Documentation

◆ on_block()

void scorum::witness::detail::witness_plugin_impl::on_block ( const signed_block b)

About once per minute the average network use is consulted and used to adjust the reserve ratio. Anything above 25% usage reduces the reserve ratio proportional to the distance from 25%. If usage is at 50% then the reserve ratio will half. Likewise, if it is at 12% it will increase by 50%.

If the reserve ratio is consistently low, then it is probably time to increase the capacity of the network.

This algorithm is designed to react quickly to observations significantly different from past observed behavior and make small adjustments when behavior is within expected norms.

Definition at line 233 of file witness_plugin.cpp.

◆ plugin_initialize()

void scorum::witness::detail::witness_plugin_impl::plugin_initialize ( )

Definition at line 77 of file witness_plugin.cpp.

◆ pre_operation()

void scorum::witness::detail::witness_plugin_impl::pre_operation ( const operation_notification note)

Definition at line 224 of file witness_plugin.cpp.

◆ pre_transaction()

void scorum::witness::detail::witness_plugin_impl::pre_transaction ( const signed_transaction trx)

Definition at line 196 of file witness_plugin.cpp.

◆ update_account_bandwidth()

void scorum::witness::detail::witness_plugin_impl::update_account_bandwidth ( const account_object &  a,
uint32_t  trx_size,
const bandwidth_type  type 
)

Definition at line 314 of file witness_plugin.cpp.

Member Data Documentation

◆ _self

witness_plugin& scorum::witness::detail::witness_plugin_impl::_self

Definition at line 74 of file witness_plugin.cpp.


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