Cleanups/bugfixes.

This commit is contained in:
JoelKatz
2012-05-31 02:40:51 -07:00
parent 64dc941bc6
commit 31a44088d6
4 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,6 @@ std::stack<SHAMapTreeNode::pointer> SHAMap::getStack(const uint256& id, bool inc
// produce a stack of nodes along the way, with the terminal node at the top
std::stack<SHAMapTreeNode::pointer> stack;
SHAMapTreeNode::pointer node = root;
while (!node->isLeaf())
{
stack.push(node);
@@ -495,6 +494,7 @@ bool SHAMap::addGiveItem(SHAMapItem::pointer item, bool isTransaction)
{
std::cerr << "Node: " << node->getString() << std::endl;
std::cerr << "NewNode: " << newNode->getString() << std::endl;
dump();
assert(false);
throw SHAMapException(InvalidNode);
}
@@ -670,6 +670,7 @@ BOOST_AUTO_TEST_SUITE(shamap)
BOOST_AUTO_TEST_CASE( SHAMap_test )
{ // h3 and h4 differ only in the leaf, same terminal node (level 19)
SHAMapNode::ClassInit();
uint256 h1, h2, h3, h4, h5;
h1.SetHex("092891fe4ef6cee585fdc6fda0e09eb4d386363158ec3321b8123e5a772c6ca7");
h2.SetHex("436ccbac3347baa1f1e53baeef1f43334da88f1f6d70d963b833afd6dfa289fe");