From 2b7febf5d050db0c54036a6340fd217e1ea0088d Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Mon, 20 May 2024 19:17:19 +0200 Subject: [PATCH] Fixed cppcheck error --- src/p2pool.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/p2pool.cpp b/src/p2pool.cpp index a42f9d0..8f3b29a 100644 --- a/src/p2pool.cpp +++ b/src/p2pool.cpp @@ -699,27 +699,27 @@ void p2pool::submit_aux_block() const ReadLock lock(m_mergeMiningClientsLock); - IMergeMiningClient::ChainParameters params; + IMergeMiningClient::ChainParameters chain_params; for (IMergeMiningClient* c : m_mergeMiningClients) { - if (!c->get_params(params)) { + if (!c->get_params(chain_params)) { continue; } - if (chain_id == params.aux_id) { + if (chain_id == chain_params.aux_id) { std::vector proof; uint32_t path; - if (m_blockTemplate->get_aux_proof(template_id, extra_nonce, params.aux_hash, proof, path)) { + if (m_blockTemplate->get_aux_proof(template_id, extra_nonce, chain_params.aux_hash, proof, path)) { if (pool_block_debug()) { const MinerData data = miner_data(); const uint32_t n_aux_chains = static_cast(data.aux_chains.size() + 1); - const uint32_t index = get_aux_slot(params.aux_id, data.aux_nonce, n_aux_chains); + const uint32_t index = get_aux_slot(chain_params.aux_id, data.aux_nonce, n_aux_chains); - if (!verify_merkle_proof(params.aux_hash, proof, index, n_aux_chains, merge_mining_root)) { + if (!verify_merkle_proof(chain_params.aux_hash, proof, index, n_aux_chains, merge_mining_root)) { LOGERR(0, "submit_aux_block: verify_merkle_proof (1) failed for chain_id " << chain_id); } - if (!verify_merkle_proof(params.aux_hash, proof, path, merge_mining_root)) { + if (!verify_merkle_proof(chain_params.aux_hash, proof, path, merge_mining_root)) { LOGERR(0, "submit_aux_block: verify_merkle_proof (2) failed for chain_id " << chain_id); } }