mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Part of the 'tray' implementation to avoid a burst of load on ledger close
This commit is contained in:
12
SHAMap.h
12
SHAMap.h
@@ -69,10 +69,14 @@ private:
|
||||
std::vector<unsigned char> mData;
|
||||
|
||||
public:
|
||||
SHAMapItem(const uint256& tag); // tag is data
|
||||
|
||||
// for transactions
|
||||
SHAMapItem(const uint256& tag, const std::vector<unsigned char>& data);
|
||||
SHAMapItem(const std::vector<unsigned char>& data); // tag by hash
|
||||
|
||||
// for account balances
|
||||
SHAMapItem(const uint160& tag, const std::vector<unsigned char>& data);
|
||||
|
||||
const uint256& getTag(void) const { return mTag; }
|
||||
std::vector<unsigned char> getData(void) const { return mData; }
|
||||
const std::vector<unsigned char>& peekData(void) const { return mData; }
|
||||
@@ -169,12 +173,12 @@ public:
|
||||
typedef boost::shared_ptr<SHAMap> pointer;
|
||||
|
||||
private:
|
||||
int mLeafDataSize, mLeafDataOffset;
|
||||
int mLeafDataSize, mLeafDataOffset, mSeq;
|
||||
mutable boost::recursive_mutex mLock;
|
||||
std::map<SHAMapNode, SHAMapLeafNode::pointer> mLeafByID;
|
||||
std::map<SHAMapNode, SHAMapInnerNode::pointer> mInnerNodeByID;
|
||||
std::map<SHAMapNode, SHAMapLeafNode::pointer> mDirtyLeafNodes;
|
||||
std::map<SHAMapNode, SHAMapInnerNode::pointer> mDirtyInnerNodes;
|
||||
boost::shared_ptr<std::map<SHAMapNode, SHAMapLeafNode::pointer> > mDirtyLeafNodes;
|
||||
boost::shared_ptr<std::map<SHAMapNode, SHAMapInnerNode::pointer> > mDirtyInnerNodes;
|
||||
|
||||
SHAMapInnerNode::pointer root;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user