mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Fixed cppcheck error
This commit is contained in:
parent
710f6c2eb7
commit
2b7febf5d0
1 changed files with 7 additions and 7 deletions
|
@ -699,27 +699,27 @@ void p2pool::submit_aux_block() const
|
||||||
|
|
||||||
ReadLock lock(m_mergeMiningClientsLock);
|
ReadLock lock(m_mergeMiningClientsLock);
|
||||||
|
|
||||||
IMergeMiningClient::ChainParameters params;
|
IMergeMiningClient::ChainParameters chain_params;
|
||||||
|
|
||||||
for (IMergeMiningClient* c : m_mergeMiningClients) {
|
for (IMergeMiningClient* c : m_mergeMiningClients) {
|
||||||
if (!c->get_params(params)) {
|
if (!c->get_params(chain_params)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chain_id == params.aux_id) {
|
if (chain_id == chain_params.aux_id) {
|
||||||
std::vector<hash> proof;
|
std::vector<hash> proof;
|
||||||
uint32_t path;
|
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()) {
|
if (pool_block_debug()) {
|
||||||
const MinerData data = miner_data();
|
const MinerData data = miner_data();
|
||||||
const uint32_t n_aux_chains = static_cast<uint32_t>(data.aux_chains.size() + 1);
|
const uint32_t n_aux_chains = static_cast<uint32_t>(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);
|
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);
|
LOGERR(0, "submit_aux_block: verify_merkle_proof (2) failed for chain_id " << chain_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue