1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

emergency update

This commit is contained in:
ton 2020-03-24 03:32:16 +04:00
parent 5d846e0aaf
commit 9f351fc29f
87 changed files with 2486 additions and 655 deletions

View file

@ -23,7 +23,7 @@
exception statement from your version. If you delete this exception statement
from all source files in the program, then also delete it here.
Copyright 2017-2019 Telegram Systems LLP
Copyright 2017-2020 Telegram Systems LLP
*/
#pragma once
@ -104,6 +104,19 @@ inline td::Result<ton::PublicKeyHash> Tokenizer::get_token() {
}
}
template <>
inline td::Result<td::Bits256> Tokenizer::get_token() {
TRY_RESULT(S, get_raw_token());
TRY_RESULT(F, td::hex_decode(S));
if (F.size() == 32) {
td::Bits256 v;
v.as_slice().copy_from(F);
return v;
} else {
return td::Status::Error("cannot parse keyhash: bad length");
}
}
template <>
inline td::Result<td::IPAddress> Tokenizer::get_token() {
TRY_RESULT(S, get_raw_token());
@ -782,7 +795,7 @@ class AddNetworkProxyAddressQuery : public Query {
return "addproxyaddr";
}
static std::string get_help() {
return "addproxyaddr <inip> <outid> <secret> {cats...} {priocats...}\tadds ip address to address list";
return "addproxyaddr <inip> <outip> <id> <secret> {cats...} {priocats...}\tadds ip address to address list";
}
std::string name() const override {
return get_name();
@ -791,6 +804,7 @@ class AddNetworkProxyAddressQuery : public Query {
private:
td::IPAddress in_addr_;
td::IPAddress out_addr_;
td::Bits256 id_;
td::BufferSlice shared_secret_;
std::vector<td::int32> cats_;
std::vector<td::int32> prio_cats_;