mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Add sha512Half and SHA512HashHasher:
These routines replace existing code to compute SHA512-Half hashes. The new code accumulates serialized data into a hashing context instead of allocating a buffer, for improved performance.
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
#include <ripple/overlay/ClusterNodeStatus.h>
|
||||
#include <ripple/app/misc/UniqueNodeList.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/basics/SHA512Half.h>
|
||||
#include <ripple/basics/Slice.h>
|
||||
#include <ripple/basics/StringUtilities.h>
|
||||
#include <ripple/basics/Time.h>
|
||||
#include <ripple/core/Config.h>
|
||||
@@ -1596,8 +1598,10 @@ bool UniqueNodeListImp::responseFetch (std::string const& strDomain, const boost
|
||||
assert (bFound);
|
||||
(void) bFound;
|
||||
|
||||
uint256 iSha256 = getSHA512Half (strSiteFile);
|
||||
bool bChangedB = sdCurrent.iSha256 != iSha256;
|
||||
uint256 iSha256 =
|
||||
sha512Half(make_Slice(strSiteFile));
|
||||
bool bChangedB =
|
||||
sdCurrent.iSha256 != iSha256;
|
||||
|
||||
sdCurrent.strDomain = strDomain;
|
||||
// XXX If the node public key is changing, delete old public key information?
|
||||
|
||||
Reference in New Issue
Block a user