From 5e262ccf14c1ca03060b730b0628324e1af7b9e6 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Thu, 13 Jun 2024 07:48:00 -0500 Subject: [PATCH] GH-278 Fix update_chain_info --- plugins/net_plugin/net_plugin.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index 9a23294f2e..07c3e1adf9 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -3309,13 +3309,11 @@ namespace eosio { uint32_t lib_num = 0, head_num = 0, fork_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.lib_num = lib_num = block_header::num_from_id(lib); + chain_info.head_id = cc.head_block_id(); chain_info.head_num = head_num = block_header::num_from_id(chain_info.head_id); chain_info.fork_head_id = cc.fork_db_head_block_id(); - chain_info.fork_head_num = head_num = block_header::num_from_id(chain_info.fork_head_id); - chain_info.fork_head_id = cc.fork_db_head_block_id(); chain_info.fork_head_num = fork_head_num = block_header::num_from_id(chain_info.fork_head_id); } fc_dlog( logger, "updating chain info lib ${lib}, head ${h} fdb_head ${f}", ("lib", lib_num)("h", head_num)("f", fork_head_num) );