mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Be more consistent.
This commit is contained in:
@@ -24,7 +24,6 @@ DECLARE_INSTANCE(SHAMapTreeNode);
|
||||
void SHAMapNode::setHash() const
|
||||
{
|
||||
std::size_t h = theApp->getNonceST() + (mDepth * 0x9e3779b9);
|
||||
|
||||
const unsigned int *ptr = reinterpret_cast<const unsigned int *>(mNodeID.begin());
|
||||
for (int i = (mDepth + 3) / 4; i >= 0; --i)
|
||||
boost::hash_combine(h, *ptr++);
|
||||
@@ -163,10 +162,11 @@ SHAMapTreeNode::pointer SHAMap::walkTo(const uint256& id, bool modify)
|
||||
while (!inNode->isLeaf())
|
||||
{
|
||||
int branch = inNode->selectBranch(id);
|
||||
if (inNode->isEmptyBranch(branch))
|
||||
return inNode;
|
||||
uint256 childHash = inNode->getChildHash(branch);
|
||||
|
||||
if (childHash.isZero())
|
||||
return inNode;
|
||||
|
||||
try
|
||||
{
|
||||
inNode = getNode(inNode->getChildNodeID(branch), childHash, false);
|
||||
|
||||
Reference in New Issue
Block a user