Skip to content

Commit

Permalink
Merge pull request #1515 from dungeon-master-666/fix_config_prevblock…
Browse files Browse the repository at this point in the history
…s100

Fix config prevblocks100
  • Loading branch information
EmelyanenkoK authored Feb 6, 2025
2 parents 050a984 + b39e089 commit 7b8009e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/block/mc-config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2338,6 +2338,8 @@ td::Result<Ref<vm::Tuple>> ConfigInfo::get_prev_blocks_info() const {
seqno -= 100;
}
tuple.push_back(td::make_cnt_ref<std::vector<vm::StackEntry>>(std::move(last_mc_blocks_100)));
} else if (get_global_version() == -1) {
return td::Status::Error("config version not set (needCapabilities)");
}

return td::make_cnt_ref<std::vector<vm::StackEntry>>(std::move(tuple));
Expand Down
3 changes: 3 additions & 0 deletions validator/impl/liteserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1905,6 +1905,9 @@ void LiteQuery::continue_getConfigParams(int mode, std::vector<int> param_list)
}
cfg = res.move_as_ok();
} else {
if (mode & block::ConfigInfo::needPrevBlocks) {
mode |= block::ConfigInfo::needCapabilities;
}
auto res = block::ConfigInfo::extract_config(mpb.root(), mode);
if (res.is_error()) {
fatal_error(res.move_as_error());
Expand Down

0 comments on commit 7b8009e

Please sign in to comment.