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

Method ProxyClientInfo

runners/proxy/ProxyClientInfo.cpp:13–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace cocoon {
12
13ProxyClientInfo::ProxyClientInfo(ProxyRunner *runner, const block::StdAddress &client_owner_address,
14 std::shared_ptr<RunnerConfig> runner_config)
15 : runner_(runner), client_owner_address_(client_owner_address) {
16 client_sc_address_ =
17 runner_->generate_client_sc_address(runner_->public_key(), runner_->owner_address(),
18 runner_->sc_address(runner_config), client_owner_address, runner_config);
19
20 if (runner_->ton_disabled()) {
21 update_state(0, to_nano(100), to_nano(1), 0, runner_->runner_config()->root_contract_config->price_per_token(),
22 td::sha256_bits256(""));
23 }
24}
25
26ProxyClientInfo::ProxyClientInfo(ProxyRunner *runner, const cocoon_api::proxyDb_ClientInfo &cr,
27 std::shared_ptr<RunnerConfig> runner_config)

Callers

nothing calls this directly

Calls 8

to_nanoFunction · 0.85
safe_divFunction · 0.85
sc_addressMethod · 0.80
ton_disabledMethod · 0.80
rdeserializeMethod · 0.80
price_per_tokenMethod · 0.45

Tested by

no test coverage detected