mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Don't serialize expired persistent states (#935)
Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
f1592641de
commit
0a82a19313
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,8 @@ bool AsyncStateSerializer::need_serialize(BlockHandle handle) {
|
||||||
if (handle->id().id.seqno == 0 || !handle->is_key_block()) {
|
if (handle->id().id.seqno == 0 || !handle->is_key_block()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ValidatorManager::is_persistent_state(handle->unix_time(), last_key_block_ts_);
|
return ValidatorManager::is_persistent_state(handle->unix_time(), last_key_block_ts_) &&
|
||||||
|
ValidatorManager::persistent_state_ttl(handle->unix_time()) > (UnixTime)td::Clocks::system();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace validator
|
} // namespace validator
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue