mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-23 03:49:23 +00:00
Fixed cppcheck errors
This commit is contained in:
parent
d78885dcd4
commit
396479c2bf
1 changed files with 2 additions and 7 deletions
|
@ -1779,13 +1779,8 @@ void SideChain::update_chain_tip(const PoolBlock* block)
|
||||||
|
|
||||||
PoolBlock* SideChain::get_parent(const PoolBlock* block) const
|
PoolBlock* SideChain::get_parent(const PoolBlock* block) const
|
||||||
{
|
{
|
||||||
if (block) {
|
|
||||||
auto it = m_blocksById.find(block->m_parent);
|
auto it = m_blocksById.find(block->m_parent);
|
||||||
if (it != m_blocksById.end()) {
|
return (it != m_blocksById.end()) ? it->second : nullptr;
|
||||||
return it->second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SideChain::is_longer_chain(const PoolBlock* block, const PoolBlock* candidate, bool& is_alternative) const
|
bool SideChain::is_longer_chain(const PoolBlock* block, const PoolBlock* candidate, bool& is_alternative) const
|
||||||
|
|
Loading…
Reference in a new issue