mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Set temp packages ttl to 1h (#953)
This leaves only 3 last temp packages Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
f7907bdd58
commit
8390d887d3
2 changed files with 2 additions and 2 deletions
|
@ -930,7 +930,7 @@ void ArchiveManager::alarm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArchiveManager::run_gc(UnixTime mc_ts, UnixTime gc_ts, UnixTime archive_ttl) {
|
void ArchiveManager::run_gc(UnixTime mc_ts, UnixTime gc_ts, UnixTime archive_ttl) {
|
||||||
auto p = get_temp_package_id_by_unixtime(std::max(gc_ts, mc_ts - TEMP_PACKAGES_TTL));
|
auto p = get_temp_package_id_by_unixtime(mc_ts - TEMP_PACKAGES_TTL);
|
||||||
std::vector<PackageId> vec;
|
std::vector<PackageId> vec;
|
||||||
for (auto &x : temp_files_) {
|
for (auto &x : temp_files_) {
|
||||||
if (x.first < p) {
|
if (x.first < p) {
|
||||||
|
|
|
@ -226,7 +226,7 @@ class ArchiveManager : public td::actor::Actor {
|
||||||
|
|
||||||
void update_permanent_slices();
|
void update_permanent_slices();
|
||||||
|
|
||||||
static const td::uint32 TEMP_PACKAGES_TTL = 86400 * 7;
|
static const td::uint32 TEMP_PACKAGES_TTL = 3600;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace validator
|
} // namespace validator
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue