diff --git a/src/cpp/ripple/SHAMap.cpp b/src/cpp/ripple/SHAMap.cpp index c0191f6c4a..7a2b91ed99 100644 --- a/src/cpp/ripple/SHAMap.cpp +++ b/src/cpp/ripple/SHAMap.cpp @@ -25,7 +25,7 @@ DECLARE_INSTANCE(SHAMap); DECLARE_INSTANCE(SHAMapItem); DECLARE_INSTANCE(SHAMapTreeNode); -void SHAMapNode::setHash() const +void SHAMapNode::setMHash() const { std::size_t h = theApp->getNonceST() + (mDepth * 0x9e3779b9); const unsigned int *ptr = reinterpret_cast(mNodeID.begin()); @@ -36,7 +36,7 @@ void SHAMapNode::setHash() const std::size_t hash_value(const SHAMapNode& mn) { - return mn.getHash(); + return mn.getMHash(); } std::size_t hash_value(const uint256& u) diff --git a/src/cpp/ripple/SHAMap.h b/src/cpp/ripple/SHAMap.h index 68db984730..f76cc0e443 100644 --- a/src/cpp/ripple/SHAMap.h +++ b/src/cpp/ripple/SHAMap.h @@ -35,7 +35,7 @@ private: int mDepth; mutable size_t mHash; - void setHash() const; + void setMHash() const; protected: SHAMapNode(int depth, const uint256& id, bool) : mNodeID(id), mDepth(depth), mHash(0) { ; } @@ -51,7 +51,7 @@ public: const uint256& getNodeID() const { return mNodeID; } bool isValid() const { return (mDepth >= 0) && (mDepth < 64); } bool isRoot() const { return mDepth == 0; } - size_t getHash() const { if (mHash == 0) setHash(); return mHash; } + size_t getMHash() const { if (mHash == 0) setMHash(); return mHash; } virtual bool isPopulated() const { return false; } diff --git a/src/cpp/ripple/SHAMapSync.cpp b/src/cpp/ripple/SHAMapSync.cpp index 2cd5e1c146..024540fd10 100644 --- a/src/cpp/ripple/SHAMapSync.cpp +++ b/src/cpp/ripple/SHAMapSync.cpp @@ -97,7 +97,7 @@ void SHAMap::getMissingNodes(std::vector& nodeIDs, std::vectorsetFullBelow(); if (mType == smtSTATE) { - fullBelowCache.add(node->getHash()); + fullBelowCache.add(node->getNodeHash()); dropBelow(node); } } @@ -162,7 +162,7 @@ std::vector SHAMap::getNeededHashes(int max) node->setFullBelow(); if (mType == smtSTATE) { - fullBelowCache.add(node->getHash()); + fullBelowCache.add(node->getNodeHash()); dropBelow(node); } }