mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
bugfixes.
This commit is contained in:
@@ -305,6 +305,7 @@ SHAMapInnerNode::SHAMapInnerNode(const SHAMapNode& id, const std::vector<unsigne
|
|||||||
Serializer s(contents);
|
Serializer s(contents);
|
||||||
for(int i=0; i<32; i++)
|
for(int i=0; i<32; i++)
|
||||||
mHashes[i]=s.get256(i*32);
|
mHashes[i]=s.get256(i*32);
|
||||||
|
updateHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
SHAMapInnerNode::SHAMapInnerNode(const SHAMapInnerNode& node, uint32 seq) : SHAMapNode(node), mHash(node.mHash),
|
SHAMapInnerNode::SHAMapInnerNode(const SHAMapInnerNode& node, uint32 seq) : SHAMapNode(node), mHash(node.mHash),
|
||||||
@@ -312,6 +313,7 @@ SHAMapInnerNode::SHAMapInnerNode(const SHAMapInnerNode& node, uint32 seq) : SHAM
|
|||||||
{
|
{
|
||||||
assert(!node.isLeaf());
|
assert(!node.isLeaf());
|
||||||
memcpy(mHashes, node.mHashes, sizeof(mHashes));
|
memcpy(mHashes, node.mHashes, sizeof(mHashes));
|
||||||
|
updateHash();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string SHAMapInnerNode::getString() const
|
std::string SHAMapInnerNode::getString() const
|
||||||
@@ -375,5 +377,5 @@ void SHAMapInnerNode::dump()
|
|||||||
for(int i=0; i<32; i++)
|
for(int i=0; i<32; i++)
|
||||||
if(!!mHashes[i]) children++;
|
if(!!mHashes[i]) children++;
|
||||||
|
|
||||||
std::cerr << " " << children << " children" << std::endl;
|
std::cerr << " " << children << " child(ren)" << std::endl;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user