Compute validated ledger age from signing time

This commit is contained in:
David Schwartz
2015-05-01 13:10:14 -07:00
committed by Nik Bougalis
parent 18299c3f7a
commit d0b28a6700
3 changed files with 40 additions and 5 deletions

View File

@@ -387,6 +387,18 @@ private:
return ret;
}
std::vector<uint32_t>
getValidationTimes (uint256 const& hash)
{
std::vector <std::uint32_t> times;
ScopedLockType sl (mLock);
if (auto j = findSet (hash))
for (auto& it : *j)
if (it.second->isTrusted())
times.push_back (it.second->getSignTime());
return times;
}
void flush ()
{
bool anyNew = false;