mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge pull request #1184 from birydrad/testnet
Merge actor stats command
This commit is contained in:
commit
e93f1a988c
100 changed files with 3408 additions and 360 deletions
|
@ -4775,11 +4775,11 @@ bool Collator::check_block_overload() {
|
|||
}
|
||||
char buffer[17];
|
||||
if (history_weight(overload_history_) >= 0) {
|
||||
sprintf(buffer, "%016llx", (unsigned long long)overload_history_);
|
||||
snprintf(buffer, sizeof(buffer), "%016llx", (unsigned long long)overload_history_);
|
||||
LOG(INFO) << "want_split set because of overload history " << buffer;
|
||||
want_split_ = true;
|
||||
} else if (history_weight(underload_history_) >= 0) {
|
||||
sprintf(buffer, "%016llx", (unsigned long long)underload_history_);
|
||||
snprintf(buffer, sizeof(buffer), "%016llx", (unsigned long long)underload_history_);
|
||||
LOG(INFO) << "want_merge set because of underload history " << buffer;
|
||||
want_merge_ = true;
|
||||
}
|
||||
|
|
|
@ -1860,7 +1860,7 @@ void LiteQuery::perform_getConfigParams(BlockIdExt blkid, int mode, std::vector<
|
|||
request_mc_block_data_state(blkid);
|
||||
} else {
|
||||
// get configuration from previous key block
|
||||
load_prevKeyBlock(blkid, [this, blkid, mode, param_list = std::move(param_list)](
|
||||
load_prevKeyBlock(blkid, [this, mode, param_list = std::move(param_list)](
|
||||
td::Result<std::pair<BlockIdExt, Ref<BlockQ>>> res) mutable {
|
||||
if (res.is_error()) {
|
||||
this->abort_query(res.move_as_error());
|
||||
|
@ -2057,7 +2057,7 @@ void LiteQuery::perform_lookupBlockWithProof(BlockId blkid, BlockIdExt mc_blkid,
|
|||
|
||||
ton::AccountIdPrefixFull pfx{blkid.workchain, blkid.shard};
|
||||
auto P = td::PromiseCreator::lambda(
|
||||
[Self = actor_id(this), mc_blkid, manager = manager_, mode, pfx](td::Result<ConstBlockHandle> res) {
|
||||
[Self = actor_id(this), mc_blkid, manager = manager_, pfx](td::Result<ConstBlockHandle> res) {
|
||||
if (res.is_error()) {
|
||||
td::actor::send_closure(Self, &LiteQuery::abort_query, res.move_as_error());
|
||||
return;
|
||||
|
@ -2073,7 +2073,7 @@ void LiteQuery::perform_lookupBlockWithProof(BlockId blkid, BlockIdExt mc_blkid,
|
|||
}
|
||||
LOG(DEBUG) << "requesting data for block " << handle->id().to_str();
|
||||
td::actor::send_closure_later(manager, &ValidatorManager::get_block_data_from_db, handle,
|
||||
[Self, mc_ref_blkid = handle->masterchain_ref_block(), mc_blkid, pfx, mode](td::Result<Ref<BlockData>> res) {
|
||||
[Self, mc_ref_blkid = handle->masterchain_ref_block(), pfx](td::Result<Ref<BlockData>> res) {
|
||||
if (res.is_error()) {
|
||||
td::actor::send_closure(Self, &LiteQuery::abort_query, res.move_as_error());
|
||||
} else {
|
||||
|
|
|
@ -290,6 +290,7 @@ td::Result<std::pair<td::Ref<ShardState>, td::Ref<ShardState>>> ShardStateQ::spl
|
|||
}
|
||||
|
||||
td::Result<td::BufferSlice> ShardStateQ::serialize() const {
|
||||
TD_PERF_COUNTER(serialize_state);
|
||||
td::PerfWarningTimer perf_timer_{"serializestate", 0.1};
|
||||
if (!data.is_null()) {
|
||||
return data.clone();
|
||||
|
@ -314,6 +315,7 @@ td::Result<td::BufferSlice> ShardStateQ::serialize() const {
|
|||
}
|
||||
|
||||
td::Status ShardStateQ::serialize_to_file(td::FileFd& fd) const {
|
||||
TD_PERF_COUNTER(serialize_state_to_file);
|
||||
td::PerfWarningTimer perf_timer_{"serializestate", 0.1};
|
||||
if (!data.is_null()) {
|
||||
auto cur_data = data.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue