mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-22 19:39:22 +00:00
Fixed cppcheck error
This commit is contained in:
parent
b8c68dc2e4
commit
d5a9fb8d0e
1 changed files with 4 additions and 4 deletions
|
@ -231,23 +231,23 @@ bool verify_merkle_proof(hash h, const std::vector<hash>& proof, size_t index, s
|
|||
if (index >= k) {
|
||||
index -= k;
|
||||
|
||||
if (proof_index >= proof.size()) {
|
||||
if (proof.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (index & 1) {
|
||||
tmp[0] = proof[proof_index];
|
||||
tmp[0] = proof[0];
|
||||
tmp[1] = h;
|
||||
}
|
||||
else {
|
||||
tmp[0] = h;
|
||||
tmp[1] = proof[proof_index];
|
||||
tmp[1] = proof[0];
|
||||
}
|
||||
|
||||
keccak(tmp[0].h, HASH_SIZE * 2, h.h);
|
||||
|
||||
index = (index >> 1) + k;
|
||||
++proof_index;
|
||||
proof_index = 1;
|
||||
}
|
||||
|
||||
for (; cnt >= 2; ++proof_index, index >>= 1, cnt >>= 1) {
|
||||
|
|
Loading…
Reference in a new issue