mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-01-03 17:29:24 +00:00
Fixed cppcheck errors
This commit is contained in:
parent
119782920a
commit
c59845e746
1 changed files with 2 additions and 2 deletions
|
@ -1568,7 +1568,7 @@ void SideChain::verify(PoolBlock* block)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that uncle and parent have the same ancestor (they must be on the same chain)
|
// Check that uncle and parent have the same ancestor (they must be on the same chain)
|
||||||
PoolBlock* tmp = parent;
|
const PoolBlock* tmp = parent;
|
||||||
while (tmp->m_sidechainHeight > uncle->m_sidechainHeight) {
|
while (tmp->m_sidechainHeight > uncle->m_sidechainHeight) {
|
||||||
tmp = get_parent(tmp);
|
tmp = get_parent(tmp);
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
|
@ -1591,7 +1591,7 @@ void SideChain::verify(PoolBlock* block)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool same_chain = false;
|
bool same_chain = false;
|
||||||
PoolBlock* tmp2 = uncle;
|
const PoolBlock* tmp2 = uncle;
|
||||||
for (size_t j = 0; (j < UNCLE_BLOCK_DEPTH) && tmp && tmp2 && (tmp->m_sidechainHeight + UNCLE_BLOCK_DEPTH >= block->m_sidechainHeight); ++j) {
|
for (size_t j = 0; (j < UNCLE_BLOCK_DEPTH) && tmp && tmp2 && (tmp->m_sidechainHeight + UNCLE_BLOCK_DEPTH >= block->m_sidechainHeight); ++j) {
|
||||||
if (tmp->m_parent == tmp2->m_parent) {
|
if (tmp->m_parent == tmp2->m_parent) {
|
||||||
same_chain = true;
|
same_chain = true;
|
||||||
|
|
Loading…
Reference in a new issue