Put the threading in the correct owner node for unthreaded nodes.

Add some additional debug to threading.
This commit is contained in:
JoelKatz
2012-09-20 00:15:48 -07:00
parent 8c354f46b7
commit 02b3bcb089
5 changed files with 34 additions and 22 deletions

View File

@@ -294,11 +294,15 @@ bool TransactionMetaSet::isNodeAffected(const uint256& node) const
return mNodes.find(node) != mNodes.end();
}
TransactionMetaNode& TransactionMetaSet::getAffectedNode(const uint256& node, int type)
TransactionMetaNode& TransactionMetaSet::getAffectedNode(const uint256& node, int type, bool overrideType)
{
std::map<uint256, TransactionMetaNode>::iterator it = mNodes.find(node);
if (it != mNodes.end())
{
if (overrideType)
it->second.setType(type);
return it->second;
}
return mNodes.insert(std::make_pair(node, TransactionMetaNode(node, type))).first->second;
}