Break out some ConsensusTransSetSF functions so I can work on them.

This commit is contained in:
JoelKatz
2013-03-20 08:58:19 -07:00
parent 72f291edd1
commit d8a384467a
2 changed files with 17 additions and 10 deletions

View File

@@ -12,17 +12,11 @@ class ConsensusTransSetSF : public SHAMapSyncFilter
{ // sync filter for transaction sets during consensus building
public:
ConsensusTransSetSF() { ; }
virtual void 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);
}
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);
}
const std::vector<unsigned char>& nodeData, SHAMapTreeNode::TNType);
virtual bool haveNode(const SHAMapNode& id, const uint256& nodeHash, std::vector<unsigned char>& nodeData);
};
// This class is only needed on add functions

View File

@@ -285,3 +285,16 @@ Json::Value LCTransaction::getJson()
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);
}