|
|
@ -65,7 +65,7 @@ uint256 CPartialMerkleTree::CalcHash(int height, unsigned int pos, const std::ve |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
// calculate left hash
|
|
|
|
// calculate left hash
|
|
|
|
uint256 left = CalcHash(height-1, pos*2, vTxid), right; |
|
|
|
uint256 left = CalcHash(height-1, pos*2, vTxid), right; |
|
|
|
// calculate right hash if not beyond the end of the array - copy left hash otherwise1
|
|
|
|
// calculate right hash if not beyond the end of the array - copy left hash otherwise
|
|
|
|
if (pos*2+1 < CalcTreeWidth(height-1)) |
|
|
|
if (pos*2+1 < CalcTreeWidth(height-1)) |
|
|
|
right = CalcHash(height-1, pos*2+1, vTxid); |
|
|
|
right = CalcHash(height-1, pos*2+1, vTxid); |
|
|
|
else |
|
|
|
else |
|
|
|