mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated smartcontract code
- updated smartcontract code - fixed bug in liteserver listening socket - updated documentation
This commit is contained in:
parent
38c3e39066
commit
b978e27b2f
63 changed files with 3185 additions and 81 deletions
|
@ -215,12 +215,21 @@ void ValidatorManagerMasterchainReiniter::choose_masterchain_state() {
|
|||
<< " is_persistent=" << (!p || ValidatorManager::is_persistent_state(h->unix_time(), p->unix_time()))
|
||||
<< " ttl=" << ValidatorManager::persistent_state_ttl(h->unix_time())
|
||||
<< " syncbefore=" << opts_->sync_blocks_before();
|
||||
if (h->unix_time() + opts_->sync_blocks_before() > td::Clocks::system()) {
|
||||
LOG(INFO) << "ignoring: too new block";
|
||||
continue;
|
||||
}
|
||||
if (!p || ValidatorManager::is_persistent_state(h->unix_time(), p->unix_time())) {
|
||||
auto ttl = ValidatorManager::persistent_state_ttl(h->unix_time());
|
||||
if (ttl > td::Clocks::system() + opts_->sync_blocks_before()) {
|
||||
td::Clocks::Duration time_to_download = 3600;
|
||||
if (ttl > td::Clocks::system() + time_to_download) {
|
||||
handle = h;
|
||||
break;
|
||||
} else {
|
||||
LOG(INFO) << "ignoring: state is expiring shortly: expire_at=" << ttl;
|
||||
}
|
||||
} else {
|
||||
LOG(INFO) << "ignoring: state is not persistent";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue