mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Add "lastgcdmasterchainstate" to validator stats (#1154)
This commit is contained in:
parent
e35b34de22
commit
cb69f307e9
6 changed files with 39 additions and 0 deletions
|
@ -2767,6 +2767,23 @@ void ValidatorManagerImpl::prepare_stats(td::Promise<std::vector<std::pair<std::
|
|||
vec.emplace_back("rotatemasterchainblock", last_rotate_block_id_.to_str());
|
||||
//vec.emplace_back("shardclientmasterchainseqno", td::to_string(min_confirmed_masterchain_seqno_));
|
||||
vec.emplace_back("stateserializermasterchainseqno", td::to_string(state_serializer_masterchain_seqno_));
|
||||
|
||||
td::actor::send_closure(db_, &Db::get_last_deleted_mc_state,
|
||||
[promise = merger.make_promise(""),
|
||||
gc_seqno = gc_masterchain_handle_->id().seqno()](td::Result<BlockSeqno> R) mutable {
|
||||
TRY_RESULT_PROMISE(promise, seqno, std::move(R));
|
||||
std::string s;
|
||||
if (seqno == 0) {
|
||||
s = "none";
|
||||
} else if (seqno <= gc_seqno) {
|
||||
s = PSTRING() << seqno << " (gc_seqno-" << (gc_seqno - seqno) << ")";
|
||||
} else {
|
||||
s = PSTRING() << seqno << " (gc_seqno+" << (seqno - gc_seqno) << ")";
|
||||
}
|
||||
std::vector<std::pair<std::string, std::string>> vec;
|
||||
vec.emplace_back("lastgcdmasterchainstate", std::move(s));
|
||||
promise.set_value(std::move(vec));
|
||||
});
|
||||
}
|
||||
|
||||
if (!shard_client_.empty()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue