本文整理汇总了C++中COutPoint::ToString方法的典型用法代码示例。如果您正苦于以下问题:C++ COutPoint::ToString方法的具体用法?C++ COutPoint::ToString怎么用?C++ COutPoint::ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COutPoint
的用法示例。
在下文中一共展示了COutPoint::ToString方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tmpVote
std::set<uint256> CGovernanceObject::RemoveInvalidVotes(const COutPoint& mnOutpoint)
{
LOCK(cs);
auto it = mapCurrentMNVotes.find(mnOutpoint);
if (it == mapCurrentMNVotes.end()) {
// don't even try as we don't have any votes from this MN
return {};
}
auto removedVotes = fileVotes.RemoveInvalidVotes(mnOutpoint, nObjectType == GOVERNANCE_OBJECT_PROPOSAL);
if (removedVotes.empty()) {
return {};
}
auto nParentHash = GetHash();
for (auto jt = it->second.mapInstances.begin(); jt != it->second.mapInstances.end(); ) {
CGovernanceVote tmpVote(mnOutpoint, nParentHash, (vote_signal_enum_t)jt->first, jt->second.eOutcome);
tmpVote.SetTime(jt->second.nCreationTime);
if (removedVotes.count(tmpVote.GetHash())) {
jt = it->second.mapInstances.erase(jt);
} else {
++jt;
}
}
if (it->second.mapInstances.empty()) {
mapCurrentMNVotes.erase(it);
}
if (!removedVotes.empty()) {
std::string removedStr;
for (auto& h : removedVotes) {
removedStr += strprintf(" %s\n", h.ToString());
}
LogPrintf("CGovernanceObject::%s -- Removed %d invalid votes for %s from MN %s:\n%s", __func__, removedVotes.size(), nParentHash.ToString(), mnOutpoint.ToString(), removedStr);
fDirtyCache = true;
}
return removedVotes;
}