Delete unused fields. Add test.
GitOrigin-RevId: 6ce7ff71d926142a7c178d56a2f489f1634322b9
This commit is contained in:
parent
2691c7fabf
commit
b3ca84fffb
@ -243,7 +243,6 @@ ActorOwn<> get_full_config(DcId dc_id, IPAddress ip_address, Promise<FullConfig>
|
||||
}
|
||||
double get_server_time_difference() override {
|
||||
return G()->get_server_time_difference();
|
||||
//return server_time_difference_;
|
||||
}
|
||||
void add_auth_key_listener(unique_ptr<Listener> listener) override {
|
||||
if (listener->notify()) {
|
||||
@ -267,8 +266,6 @@ ActorOwn<> get_full_config(DcId dc_id, IPAddress ip_address, Promise<FullConfig>
|
||||
private:
|
||||
DcId dc_id_;
|
||||
std::shared_ptr<PublicRsaKeyShared> public_rsa_key_ = std::make_shared<PublicRsaKeyShared>(DcId::empty());
|
||||
bool has_server_time_difference_ = false;
|
||||
double server_time_difference_ = 0;
|
||||
|
||||
std::vector<std::unique_ptr<Listener>> auth_key_listeners_;
|
||||
void notify() {
|
||||
@ -277,10 +274,10 @@ ActorOwn<> get_full_config(DcId dc_id, IPAddress ip_address, Promise<FullConfig>
|
||||
auth_key_listeners_.erase(it, auth_key_listeners_.end());
|
||||
}
|
||||
|
||||
string auth_key_key() {
|
||||
string auth_key_key() const {
|
||||
return PSTRING() << "config_recovery_auth" << dc_id().get_raw_id();
|
||||
}
|
||||
string future_salts_key() {
|
||||
string future_salts_key() const {
|
||||
return PSTRING() << "config_recovery_salt" << dc_id().get_raw_id();
|
||||
}
|
||||
};
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "td/utils/Time.h"
|
||||
|
||||
namespace td {
|
||||
|
||||
GetHostByNameActor::GetHostByNameActor(int32 ok_timeout, int32 error_timeout)
|
||||
: ok_timeout_(ok_timeout), error_timeout_(error_timeout) {
|
||||
}
|
||||
@ -45,4 +46,5 @@ Result<td::IPAddress> GetHostByNameActor::load_ip(string host, int port) {
|
||||
return std::move(status);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -298,6 +298,7 @@ TEST(Misc, idn_to_ascii) {
|
||||
test_idn_to_ascii_one("win-2k12r2-addc.阿伯测阿伯测ad.hai.com", "win-2k12r2-addc.xn--ad-tl3ca3569aba8944eca.hai.com");
|
||||
test_idn_to_ascii_one("✌️.ws", "xn--7bi.ws");
|
||||
test_idn_to_ascii_one("⛧", "xn--59h");
|
||||
test_idn_to_ascii_one("--рф.рф", "xn-----mmcq.xn--p1ai");
|
||||
ASSERT_TRUE(idn_to_ascii("\xc0").is_error());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user