mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Break out some ConsensusTransSetSF functions so I can work on them.
This commit is contained in:
@@ -12,17 +12,11 @@ class ConsensusTransSetSF : public SHAMapSyncFilter
|
|||||||
{ // sync filter for transaction sets during consensus building
|
{ // sync filter for transaction sets during consensus building
|
||||||
public:
|
public:
|
||||||
ConsensusTransSetSF() { ; }
|
ConsensusTransSetSF() { ; }
|
||||||
|
|
||||||
virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash,
|
virtual void gotNode(const SHAMapNode& id, const uint256& nodeHash,
|
||||||
const std::vector<unsigned char>& nodeData, SHAMapTreeNode::TNType)
|
const std::vector<unsigned char>& nodeData, SHAMapTreeNode::TNType);
|
||||||
{
|
|
||||||
// WRITEME: If 'isLeaf' is true, this is a transaction
|
virtual bool haveNode(const SHAMapNode& id, const uint256& nodeHash, std::vector<unsigned char>& nodeData);
|
||||||
theApp->getTempNodeCache().store(nodeHash, nodeData);
|
|
||||||
}
|
|
||||||
virtual bool haveNode(const SHAMapNode& id, const uint256& nodeHash, std::vector<unsigned char>& nodeData)
|
|
||||||
{
|
|
||||||
// WRITEME: We could check our own map, we could check transaction tables
|
|
||||||
return theApp->getTempNodeCache().retrieve(nodeHash, nodeData);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// This class is only needed on add functions
|
// This class is only needed on add functions
|
||||||
|
|||||||
@@ -285,3 +285,16 @@ Json::Value LCTransaction::getJson()
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConsensusTransSetSF::gotNode(const SHAMapNode& id, const uint256& nodeHash,
|
||||||
|
const std::vector<unsigned char>& nodeData, SHAMapTreeNode::TNType)
|
||||||
|
{
|
||||||
|
// WRITEME: If 'isLeaf' is true, this is a transaction
|
||||||
|
theApp->getTempNodeCache().store(nodeHash, nodeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ConsensusTransSetSF::haveNode(const SHAMapNode& id, const uint256& nodeHash,
|
||||||
|
std::vector<unsigned char>& nodeData)
|
||||||
|
{
|
||||||
|
// WRITEME: We could check our own map, we could check transaction tables
|
||||||
|
return theApp->getTempNodeCache().retrieve(nodeHash, nodeData);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user