mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Cleanups/bugfixes.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user