MCPcopy Create free account
hub / github.com/TelegramMessenger/cocoon / sync

Function sync

runners/utils/sync_time.cpp:24–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24td::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
33int main(int argc, char* argv[]) {
34 SET_VERBOSITY_LEVEL(verbosity_INFO);

Callers 1

mainFunction · 0.85

Calls 1

do_syncFunction · 0.85

Tested by

no test coverage detected