diff --git a/src/SHAMap.h b/src/SHAMap.h index 2621ba58e..c41406d36 100644 --- a/src/SHAMap.h +++ b/src/SHAMap.h @@ -237,7 +237,7 @@ public: virtual ~SHAMapSyncFilter() { ; } virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash, - const std::vector& nodeData, bool isLeaf) + const std::vector& nodeData, SHAMapTreeNode::TNType type) { ; } virtual bool haveNode(const SHAMapNode& id, const uint256& nodeHash, std::vector& nodeData) diff --git a/src/SHAMapSync.cpp b/src/SHAMapSync.cpp index 028a5db1c..5e9cec50f 100644 --- a/src/SHAMapSync.cpp +++ b/src/SHAMapSync.cpp @@ -247,7 +247,7 @@ bool SHAMap::addKnownNode(const SHAMapNode& node, const std::vectoraddRaw(s, snfPREFIX); - filter->gotNode(node, hash, s.peekData(), newNode->isLeaf()); + filter->gotNode(node, hash, s.peekData(), newNode->getType()); } mTNByID[*newNode] = newNode; diff --git a/src/SHAMapSync.h b/src/SHAMapSync.h index 3d673e37a..8cdfe5eec 100644 --- a/src/SHAMapSync.h +++ b/src/SHAMapSync.h @@ -12,7 +12,7 @@ class ConsensusTransSetSF : public SHAMapSyncFilter public: ConsensusTransSetSF() { ; } virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash, - const std::vector& nodeData, bool isLeaf) + const std::vector& nodeData, SHAMapTreeNode::TNType) { // WRITEME: If 'isLeaf' is true, this is a transaction theApp->getTempNodeCache().store(nodeHash, nodeData); @@ -35,7 +35,7 @@ public: { ; } virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash, - const std::vector& nodeData, bool isLeaf) + const std::vector& nodeData, SHAMapTreeNode::TNType) { theApp->getHashedObjectStore().store(hotACCOUNT_NODE, mLedgerSeq, nodeData, nodeHash); } @@ -56,10 +56,10 @@ public: { ; } virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash, - const std::vector& nodeData, bool isLeaf) + const std::vector& nodeData, SHAMapTreeNode::TNType type) { - theApp->getHashedObjectStore().store(isLeaf ? hotTRANSACTION : hotTRANSACTION_NODE, mLedgerSeq, - nodeData, nodeHash); + theApp->getHashedObjectStore().store((type == tnTRANSACTION_NM) ? hotTRANSACTION : hotTRANSACTION_NODE, + mLedgerSeq, nodeData, nodeHash); } virtual bool haveNode(const SHAMapNode& id, const uint256& nodeHash, std::vector& nodeData) { // fetchNodeExternal already tried