Get rid of hash_SMN and instead extend boost::hash.

This makes the TaggedCache code cleaner.
This commit is contained in:
JoelKatz
2012-06-04 06:01:11 -07:00
parent 98190a4284
commit 2206ff3be6
6 changed files with 29 additions and 32 deletions

View File

@@ -726,6 +726,7 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet)
{
SHAMap::pointer map;
newcoin::TMLedgerData reply;
bool fatLeaves = true;
if (packet.itype() == newcoin::liTS_CANDIDATE)
{ // Request is for a transaction candidate set
@@ -748,6 +749,7 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet)
reply.set_ledgerseq(0);
reply.set_ledgerhash(txHash.begin(), txHash.size());
reply.set_type(newcoin::liTS_CANDIDATE);
fatLeaves = false; // We'll already have most transactions
}
else
{ // Figure out what ledger they want
@@ -828,7 +830,7 @@ void Peer::recvGetLedger(newcoin::TMGetLedger& packet)
}
std::vector<SHAMapNode> nodeIDs;
std::list< std::vector<unsigned char> > rawNodes;
if(map->getNodeFat(mn, nodeIDs, rawNodes))
if(map->getNodeFat(mn, nodeIDs, rawNodes, fatLeaves))
{
std::vector<SHAMapNode>::iterator nodeIDIterator;
std::list< std::vector<unsigned char> >::iterator rawNodeIterator;