diff --git a/modules/ripple_data/crypto/ripple_Base58Data.cpp b/modules/ripple_data/crypto/ripple_Base58Data.cpp index d8c0a9d85..6623a79d3 100644 --- a/modules/ripple_data/crypto/ripple_Base58Data.cpp +++ b/modules/ripple_data/crypto/ripple_Base58Data.cpp @@ -109,8 +109,16 @@ bool CBase58Data::operator> (const CBase58Data& b58) const { return CompareTo(b5 std::size_t hash_value(const CBase58Data& b58) { - std::size_t seed = HashMaps::getInstance ().getNonce () - + (b58.nVersion * 0x9e3779b9); + // VFALCO: TODO, figure out what this is for and whether or + // not it affects the protocol specification. + // + // NOTE, this constant is used elsewhere as well. + // should it be DRY? + // + const std::size_t mysteriousConstant = 0x9e3779b9; + + std::size_t seed = HashMaps::getInstance ().getNonce () + + (b58.nVersion * mysteriousConstant); boost::hash_combine (seed, b58.vchData); diff --git a/src/cpp/ripple/SHAMap.cpp b/src/cpp/ripple/SHAMap.cpp index 663e43177..c232eec72 100644 --- a/src/cpp/ripple/SHAMap.cpp +++ b/src/cpp/ripple/SHAMap.cpp @@ -29,6 +29,9 @@ void SHAMapNode::setMHash() const // VFALCO: TODO, figure out what this is for and whether or // not it affects the protocol specification. // + // NOTE, this constant is used elsewhere as well. + // should it be DRY? + // const std::size_t mysteriousConstant = 0x9e3779b9; std::size_t h = HashMaps::getInstance ().getNonce ()