Skip to content

Commit

Permalink
GH-2125 Add additional logging
Browse files Browse the repository at this point in the history
  • Loading branch information
heifner committed Mar 8, 2024
1 parent febdebb commit 51713a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
1 change: 1 addition & 0 deletions libraries/chain/include/eosio/chain/block_header_state.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 51713a2

Please sign in to comment.