mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add CryptoIdentifierType and RippleCryptoIdentifier Traits
This commit is contained in:
@@ -22,7 +22,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
typedef boost::unordered_map <PublicKey, Info, PublicKey::HashFunction> MapType;
|
||||
typedef boost::unordered_map <PublicKey, Info, PublicKey::hasher> MapType;
|
||||
|
||||
ChosenList (std::size_t expectedSize = 0)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
};
|
||||
|
||||
typedef boost::unordered_map <
|
||||
PublicKey, ValidatorInfo, PublicKey::HashFunction> MapType;
|
||||
PublicKey, ValidatorInfo, PublicKey::hasher> MapType;
|
||||
|
||||
struct State
|
||||
{
|
||||
@@ -318,12 +318,10 @@ public:
|
||||
iter != list->map().end(); ++iter)
|
||||
{
|
||||
Json::Value entry (Json::objectValue);
|
||||
/*
|
||||
ChosenList::MapType::key_type const& key (iter->first);
|
||||
ChosenList::MapType::mapped_type const& value (iter->second);
|
||||
entry ["key"] = key;
|
||||
entry ["value"] = value;
|
||||
*/
|
||||
entry ["key"] = key.to_string();
|
||||
//ChosenList::MapType::mapped_type const& value (iter->second);
|
||||
//entry ["value"] = value.to_string();
|
||||
entries.append (entry);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ bool Utilities::parseInfoLine (
|
||||
else if (deprecatedPublicKey.setNodePublic (encodedKey))
|
||||
{
|
||||
// We got a public key.
|
||||
RipplePublicKey publicKey (deprecatedPublicKey.toRipplePublicKey ());
|
||||
RipplePublicKey publicKey (deprecatedPublicKey);
|
||||
success = true;
|
||||
}
|
||||
else
|
||||
@@ -238,15 +238,15 @@ Time Utilities::stringToTime (String s)
|
||||
|
||||
std::string Utilities::publicKeyToString (PublicKey const& publicKey)
|
||||
{
|
||||
std::string s (PublicKey::sizeInBytes, ' ');
|
||||
std::string s (PublicKey::size, ' ');
|
||||
std::copy (publicKey.cbegin(), publicKey.cend(), s.begin());
|
||||
return s;
|
||||
}
|
||||
|
||||
PublicKey Utilities::stringToPublicKey (std::string const& s)
|
||||
{
|
||||
bassert (s.size() == PublicKey::sizeInBytes);
|
||||
return PublicKey (&s.front());
|
||||
bassert (s.size() == PublicKey::size);
|
||||
return PublicKey ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user