mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Fix some isEmptyBranch and getNodeID performance issues.
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <stack>
|
||||
#include <bitset>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/enable_shared_from_this.hpp>
|
||||
@@ -166,10 +165,10 @@ public:
|
||||
private:
|
||||
uint256 mHash;
|
||||
uint256 mHashes[16];
|
||||
std::bitset<16> mIsBranch;
|
||||
SHAMapItem::pointer mItem;
|
||||
uint32 mSeq, mAccessSeq;
|
||||
TNType mType;
|
||||
int mIsBranch;
|
||||
bool mFullBelow;
|
||||
|
||||
bool updateHash();
|
||||
@@ -208,7 +207,7 @@ public:
|
||||
// inner node functions
|
||||
bool isInnerNode() const { return !mItem; }
|
||||
bool setChildHash(int m, const uint256& hash);
|
||||
bool isEmptyBranch(int m) const { return !mIsBranch.test(m); }
|
||||
bool isEmptyBranch(int m) const { return (mIsBranch & (1 << m)) == 0; }
|
||||
bool isEmpty() const;
|
||||
int getBranchCount() const;
|
||||
void makeInner();
|
||||
|
||||
Reference in New Issue
Block a user