From 51713a2c7be907b5603bf3c2883e6f6b7007d1f9 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 8 Mar 2024 14:40:38 -0600 Subject: [PATCH] GH-2125 Add additional logging --- libraries/chain/controller.cpp | 1 + libraries/chain/include/eosio/chain/block_header_state.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/libraries/chain/controller.cpp b/libraries/chain/controller.cpp index 03daed4066..b78112d92c 100644 --- a/libraries/chain/controller.cpp +++ b/libraries/chain/controller.cpp @@ -697,6 +697,7 @@ struct building_block { "most recent ancestor QC block number (${a}) cannot be greater than parent's block number (${p})", ("a", qc->block_num)("p", block_header::num_from_id(parent_id())) ); auto qc_claim = qc_claim_t { qc->block_num, qc->qc.is_strong() }; + ilog("integrate qc is_needed qc: ${qc}, strong=${s}", ("qc", qc->block_num)("s", qc->qc.is_strong())); if( bb.parent.is_needed(*qc) ) { ilog("integrate qc and qc claim ${qc} into block ${bn}", ("qc", qc_claim)("bn", block_header::num_from_id(parent_id())+1)); qc_data = qc_data_t{ *qc, qc_claim }; diff --git a/libraries/chain/include/eosio/chain/block_header_state.hpp b/libraries/chain/include/eosio/chain/block_header_state.hpp index bee4855c94..896da1c466 100644 --- a/libraries/chain/include/eosio/chain/block_header_state.hpp +++ b/libraries/chain/include/eosio/chain/block_header_state.hpp @@ -73,6 +73,7 @@ struct block_header_state { // block descending from this need the provided qc in the block extension bool is_needed(const quorum_certificate& qc) const { + ilog("qc is_needed: ${qc} > ${lc} = ${r}", ("qc", qc.block_num)("lc", core.latest_qc_claim().block_num)("r", qc.block_num > core.latest_qc_claim().block_num)); return qc.block_num > core.latest_qc_claim().block_num; }