| 1617 | } |
| 1618 | |
| 1619 | std::string ProxyRunner::http_charge(std::string client_owner_address_str) { |
| 1620 | auto it2 = clients_.find(client_owner_address_str); |
| 1621 | if (it2 == clients_.end()) { |
| 1622 | return wrap_short_answer_to_http("client not found"); |
| 1623 | } |
| 1624 | |
| 1625 | auto &client = *it2->second; |
| 1626 | |
| 1627 | if (client.charging_now()) { |
| 1628 | return wrap_short_answer_to_http("request already running"); |
| 1629 | } |
| 1630 | if (!client.tokens_ready_to_charge()) { |
| 1631 | return wrap_short_answer_to_http("nothing to charge"); |
| 1632 | } |
| 1633 | |
| 1634 | client_charge(client, false); |
| 1635 | return wrap_short_answer_to_http("request sent"); |
| 1636 | } |
| 1637 | |
| 1638 | std::string ProxyRunner::http_enable_disable(td::int64 disable_up_to_version) { |
| 1639 | proxy_enable_disable(disable_up_to_version); |
nothing calls this directly
no test coverage detected