mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Cleanups and optimizations.
This commit is contained in:
@@ -99,10 +99,9 @@ SHAMapNode SHAMapNode::getChildNodeID(int m) const
|
||||
{ // This can be optimized to avoid the << if needed
|
||||
assert((m>=0) && (m<16));
|
||||
|
||||
uint256 branch=m;
|
||||
branch<<=mDepth*4;
|
||||
|
||||
return SHAMapNode(mDepth+1, mNodeID | branch);
|
||||
uint256 child(mNodeID);
|
||||
child.PeekAt(mDepth/8) |= m << (4*(mDepth%8));
|
||||
return SHAMapNode(mDepth+1, child);
|
||||
}
|
||||
|
||||
int SHAMapNode::selectBranch(const uint256& hash) const
|
||||
|
||||
Reference in New Issue
Block a user