| 22 | } |
| 23 | |
| 24 | td::actor::Task<td::Unit> sync(Options opts) { |
| 25 | LOG(INFO) << "Started: config=" << opts.ton_config_filename << " net=" << (opts.is_testnet ? "testnet" : "mainnet"); |
| 26 | auto sync_info = (co_await do_sync(opts).wrap()).move_as_ok(); |
| 27 | LOG(INFO) << "Finished"; |
| 28 | // Print blockchain timestamp from sync_info to avoid race condition |
| 29 | std::cout << sync_info.last_synced_ts << std::endl; |
| 30 | std::_Exit(0); |
| 31 | } |
| 32 | |
| 33 | int main(int argc, char* argv[]) { |
| 34 | SET_VERBOSITY_LEVEL(verbosity_INFO); |