delete GXS IDs with no TS

This commit is contained in:
csoler 2016-07-11 18:44:52 -04:00
parent 951f29f155
commit a7d82cf197

View File

@ -340,16 +340,14 @@ public:
std::map<RsGxsId,time_t>::const_iterator it = mLastUsageTS.find(gxs_id) ;
if(it == mLastUsageTS.end())
{
std::cerr << "No Ts for this ID => kept" << std::endl;
return true ;
}
bool no_ts = (it == mLastUsageTS.end()) ;
time_t last_usage_ts = it->second;
time_t last_usage_ts = no_ts?0:(it->second);
time_t max_keep_time ;
if(is_id_banned)
if(no_ts)
max_keep_time = 0 ;
else if(is_id_banned)
max_keep_time = MAX_KEEP_KEYS_BANNED ;
else if(is_known_id)
max_keep_time = MAX_KEEP_KEYS_SIGNED_KNOWN ;