Skip to content

Change Net Plugin Log Messages To Be Less Alarming #73

@ericpassmore

Description

@ericpassmore

Net_plugin has log message which use the word fork. This may cause unneeded alarm as many people associate fork with a divergence in block chain across nodes. This issue is a request to use a different noun in place of fork in net_plugin.

Example: updating chain info lib ${lib}, fork ${fork}

// call only from main application thread
void net_plugin_impl::update_chain_info() {
controller& cc = chain_plug->chain();
uint32_t lib_num = 0, head_num = 0;
{
fc::lock_guard g( chain_info_mtx );
chain_info.lib_id = cc.last_irreversible_block_id();
chain_info.lib_num = lib_num = block_header::num_from_id(chain_info.lib_id);
chain_info.head_id = cc.fork_db_head_block_id();
chain_info.head_num = head_num = block_header::num_from_id(chain_info.head_id);
}
fc_dlog( logger, "updating chain info lib ${lib}, fork ${fork}", ("lib", lib_num)("fork", head_num) );
}
// call only from main application thread
void net_plugin_impl::update_chain_info(const block_id_type& lib) {
controller& cc = chain_plug->chain();
uint32_t lib_num = 0, head_num = 0;
{
fc::lock_guard g( chain_info_mtx );
chain_info.lib_num = lib_num = block_header::num_from_id(lib);
chain_info.lib_id = lib;
chain_info.head_id = cc.fork_db_head_block_id();
chain_info.head_num = head_num = block_header::num_from_id(chain_info.head_id);
}
fc_dlog( logger, "updating chain info lib ${lib}, fork ${fork}", ("lib", lib_num)("fork", head_num) );
}

Metadata

Metadata

Assignees

Labels

OCIWork exclusive to OCI team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions