New hash_append robust container hash function framework:

* is_contiguous_hashable trait identifies optimizable types
* hash_append() function overloads for basic types:
  - scalars, floats
  - array, C array
  - pair, tuple
  - boost array and tuple (if configured)
* Provided Spooky hash wrapper for use with hash_append
* Use hash_append in hardened_hash and other places
* New Utility meta functions for working with variadics:
  - static_and
  - static_sum
* Added type_name utility function for diagnostics
* hash_metrics suite of functions to evalulate hash functions
* Test suites to measure hash function performance
* Various fixes
This commit is contained in:
Howard Hinnant
2014-03-30 23:17:29 -07:00
committed by Vinnie Falco
parent 14830c7cb4
commit 30e882196f
32 changed files with 2641 additions and 149 deletions

View File

@@ -28,8 +28,8 @@ bool OfferCreateTransactor::isValidOffer (
STAmount const& saOfferPays,
STAmount const& saOfferGets,
uint160 const& uTakerAccountID,
std::unordered_set<uint256>& usOfferUnfundedBecame,
std::unordered_set<uint160>& usAccountTouched,
std::unordered_set<uint256, beast::hardened_hash<uint256>>& usOfferUnfundedBecame,
std::unordered_set<uint160, beast::hardened_hash<uint160>>& usAccountTouched,
STAmount& saOfferFunds)
{
if (sleOffer->isFieldPresent (sfExpiration) &&
@@ -142,10 +142,10 @@ TER OfferCreateTransactor::takeOffers (
TER terResult = temUNCERTAIN;
// Offers that became unfunded.
std::unordered_set<uint256> usOfferUnfundedBecame;
std::unordered_set<uint256, beast::hardened_hash<uint256>> usOfferUnfundedBecame;
// Accounts touched.
std::unordered_set<uint160> usAccountTouched;
std::unordered_set<uint160, beast::hardened_hash<uint160>> usAccountTouched;
saTakerPaid = STAmount (saTakerPays.getCurrency (), saTakerPays.getIssuer ());
saTakerGot = STAmount (saTakerGets.getCurrency (), saTakerGets.getIssuer ());