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

Fix returning config from LS, add extra c7 elements in getmethods (#713)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2023-05-27 21:22:31 +03:00 committed by GitHub
parent 049ed0c737
commit 6b941dcceb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 111 additions and 32 deletions

View file

@ -62,7 +62,8 @@ void LastConfig::with_last_block(td::Result<LastBlockState> r_last_block) {
}
auto last_block = r_last_block.move_as_ok();
client_.send_query(ton::lite_api::liteServer_getConfigAll(0, create_tl_lite_block_id(last_block.last_block_id)),
client_.send_query(ton::lite_api::liteServer_getConfigAll(block::ConfigInfo::needPrevBlocks,
create_tl_lite_block_id(last_block.last_block_id)),
[this](auto r_config) { this->on_config(std::move(r_config)); });
}
@ -92,7 +93,7 @@ td::Status LastConfig::process_config_proof(ton::ton_api::object_ptr<ton::lite_a
}
TRY_RESULT(state, block::check_extract_state_proof(blkid, raw_config->state_proof_.as_slice(),
raw_config->config_proof_.as_slice()));
TRY_RESULT(config, block::Config::extract_from_state(std::move(state), 0));
TRY_RESULT(config, block::ConfigInfo::extract_config(std::move(state), block::ConfigInfo::needPrevBlocks));
for (auto i : params_) {
VLOG(last_config) << "ConfigParam(" << i << ") = ";
@ -109,6 +110,7 @@ td::Status LastConfig::process_config_proof(ton::ton_api::object_ptr<ton::lite_a
VLOG(last_config) << os.str();
}
}
TRY_RESULT_ASSIGN(state_.prev_blocks_info, config->get_prev_blocks_info());
state_.config.reset(config.release());
return td::Status::OK();
}