From 5e7d48e70c535cbf07061bde7938faedc7c8b5d2 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Wed, 22 May 2024 15:27:23 +0200 Subject: [PATCH] Fix: don't call update_block_template twice --- src/merge_mining_client_tari.cpp | 2 +- src/p2pool.cpp | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/merge_mining_client_tari.cpp b/src/merge_mining_client_tari.cpp index f3bdf88..527fc0c 100644 --- a/src/merge_mining_client_tari.cpp +++ b/src/merge_mining_client_tari.cpp @@ -255,7 +255,7 @@ void MergeMiningClientTari::submit_solution(const BlockTemplate* block_tpl, cons } else { const std::string& h = response.block_hash(); - LOGINFO(3, log::LightGreen() << "Mined Tari block " << log::hex_buf(h.data(), h.size())); + LOGINFO(0, log::LightGreen() << "Mined Tari block " << log::hex_buf(h.data(), h.size()) << " at height " << block.header().height()); } } diff --git a/src/p2pool.cpp b/src/p2pool.cpp index 8f3b29a..5a7e4d6 100644 --- a/src/p2pool.cpp +++ b/src/p2pool.cpp @@ -578,13 +578,12 @@ void p2pool::update_aux_data(const hash& chain_id) if (!chain_id.empty()) { LOGINFO(4, "New aux data from chain " << chain_id); - } - - if (!is_main_thread()) { - update_block_template_async(); - } - else { - update_block_template(); + if (!is_main_thread()) { + update_block_template_async(); + } + else { + update_block_template(); + } } }