Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/1.1' into merge_fix_diff…
Browse files Browse the repository at this point in the history
…_sign_comp_warning
  • Loading branch information
linh2931 committed Feb 20, 2025
2 parents 6264318 + 94c2d2d commit 285cce9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions libraries/chain/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4400,9 +4400,13 @@ struct controller_impl {
if( switch_fork ) {
auto head_fork_comp_str =
block_handle_accessor::apply<std::string>(chain_head, [](auto& head) -> std::string { return log_fork_comparison(*head); });
ilog("switching forks from ${chid} (block number ${chn}) ${c} to ${nhid} (block number ${nhn}) ${n}",
("chid", chain_head.id())("chn", chain_head.block_num())("nhid", new_head->id())("nhn", new_head->block_num())
ilog("switching forks from ${chid} (block number ${chn} ${cp}) ${c} to ${nhid} (block number ${nhn} ${np}) ${n}",
("chid", chain_head.id())("chn", chain_head.block_num())("cp", chain_head.producer())
("nhid", new_head->id())("nhn", new_head->block_num())("np", new_head->producer())
("c", head_fork_comp_str)("n", log_fork_comparison(*new_head)));
if (chain_head.block_num() == new_head->block_num() && chain_head.producer() == new_head->producer()) {
wlog("${p} double produced block ${n}", ("p", new_head->producer())("n", new_head->block_num()));
}

// not possible to log transaction specific info when switching forks
if (auto dm_logger = get_deep_mind_logger(false)) {
Expand Down
2 changes: 1 addition & 1 deletion tests/block_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ BOOST_DATA_TEST_CASE(nonprune_to_prune_on_start, bdata::make({1, 1500}) * bdata:

const unsigned num_blocks_to_add = prune_blocks*3;
unsigned next_block = starting_block == 1 ? 2 : starting_block;
for(unsigned i = 0; i < prune_blocks*3; ++i)
for(auto i = 0; i < prune_blocks*3; ++i)
t.add(next_block++, payload_size(), 'z');
t.check_n_bounce([&]() {});

Expand Down

0 comments on commit 285cce9

Please sign in to comment.