mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-01 08:25:51 +00:00
Bugfixes and new unit test.
This commit is contained in:
@@ -279,14 +279,16 @@ bool SHAMapTreeNode::setItem(SHAMapItem::pointer& i, TNType type)
|
||||
|
||||
SHAMapItem::pointer SHAMapTreeNode::getItem() const
|
||||
{
|
||||
assert(isLeaf());
|
||||
return boost::make_shared<SHAMapItem>(*mItem);
|
||||
}
|
||||
|
||||
int SHAMapTreeNode::getBranchCount() const
|
||||
{
|
||||
assert(isInner());
|
||||
int ret=0;
|
||||
for(int i=0; i<16; i++)
|
||||
if(!mHashes[i]) ret++;
|
||||
for(int i=0; i<16; ++i)
|
||||
if(!!mHashes[i]) ++ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user