mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-17 00:07:47 +00:00
Check return value (Coverity fix)
This commit is contained in:
parent
93cd9a659a
commit
afb52e4235
1 changed files with 7 additions and 1 deletions
|
@ -1293,7 +1293,13 @@ void SideChain::verify(PoolBlock* block)
|
|||
});
|
||||
|
||||
std::vector<uint64_t> rewards;
|
||||
split_reward(total_reward, shares, rewards);
|
||||
if (!split_reward(total_reward, shares, rewards)) {
|
||||
LOGWARN(3, "block at height = " << block->m_sidechainHeight <<
|
||||
", id = " << block->m_sidechainId <<
|
||||
", mainchain height = " << block->m_txinGenHeight << ": split_reward failed");
|
||||
block->m_invalid = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (rewards.size() != block->m_outputs.size()) {
|
||||
LOGWARN(3, "block at height = " << block->m_sidechainHeight <<
|
||||
|
|
Loading…
Reference in a new issue