mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add methods to sign and import certificates
This commit is contained in:
parent
3384d204d2
commit
cb31a20206
20 changed files with 682 additions and 18 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
Copyright 2017-2020 Telegram Systems LLP
|
||||
*/
|
||||
#include "auto/tl/ton_api.h"
|
||||
#include "td/utils/Random.h"
|
||||
|
||||
#include "adnl/utils.hpp"
|
||||
|
@ -25,6 +26,7 @@
|
|||
#include "auto/tl/ton_api.hpp"
|
||||
|
||||
#include "keys/encryptor.h"
|
||||
#include "td/utils/StringBuilder.h"
|
||||
|
||||
namespace ton {
|
||||
|
||||
|
@ -554,6 +556,19 @@ void OverlayImpl::broadcast_checked(Overlay::BroadcastHash hash, td::Result<td::
|
|||
}
|
||||
}
|
||||
|
||||
void OverlayImpl::get_stats(td::Promise<tl_object_ptr<ton_api::engine_validator_overlayStats>> promise) {
|
||||
auto res = create_tl_object<ton_api::engine_validator_overlayStats>();
|
||||
res->adnl_id_ = local_id_.bits256_value();
|
||||
res->overlay_id_ = overlay_id_.bits256_value();
|
||||
res->overlay_id_full_ = id_full_.pubkey().tl();
|
||||
peers_.iterate([&](const adnl::AdnlNodeIdShort &key, const OverlayPeer &peer) { res->nodes_.push_back(key.tl()); });
|
||||
|
||||
res->stats_.push_back(
|
||||
create_tl_object<ton_api::engine_validator_oneStat>("neighbours_cnt", PSTRING() << neighbours_.size()));
|
||||
|
||||
promise.set_value(std::move(res));
|
||||
}
|
||||
|
||||
} // namespace overlay
|
||||
|
||||
} // namespace ton
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue