mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Replace Serializer with Blob in SHAMapItem:
* This helps decouples SHAMap and Serializer. * Restyle data member names. * Rename getTag() to key().
This commit is contained in:
committed by
Vinnie Falco
parent
72659d431e
commit
26bfeb1319
@@ -18,35 +18,23 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
#include <ripple/protocol/Serializer.h>
|
||||
#include <ripple/shamap/SHAMapItem.h>
|
||||
|
||||
|
||||
namespace ripple {
|
||||
|
||||
class SHAMap;
|
||||
|
||||
SHAMapItem::SHAMapItem (uint256 const& tag, Blob const& data)
|
||||
: mTag (tag)
|
||||
, mData (data.data(), data.size())
|
||||
: tag_(tag)
|
||||
, data_(data)
|
||||
{
|
||||
}
|
||||
|
||||
SHAMapItem::SHAMapItem (uint256 const& tag, const Serializer& data)
|
||||
: mTag (tag)
|
||||
, mData (data.data(), data.size())
|
||||
: tag_ (tag)
|
||||
, data_(data.peekData())
|
||||
{
|
||||
}
|
||||
|
||||
SHAMapItem::SHAMapItem (uint256 const& key, Serializer&& s)
|
||||
: mTag(key)
|
||||
, mData(std::move(s))
|
||||
{
|
||||
}
|
||||
|
||||
// VFALCO This function appears not to be called
|
||||
void SHAMapItem::dump (beast::Journal journal)
|
||||
{
|
||||
if (journal.info) journal.info <<
|
||||
"SHAMapItem(" << mTag << ") " << mData.size () << "bytes";
|
||||
}
|
||||
|
||||
} // ripple
|
||||
|
||||
Reference in New Issue
Block a user