Skip to content

Commit

Permalink
Merge branch 'testnet' into block-generation
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese committed Jul 21, 2023
2 parents 32b3fe7 + 6074702 commit 66b98b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion tonlib/tonlib/LastConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ 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::ConfigInfo::extract_config(std::move(state), block::ConfigInfo::needPrevBlocks));
TRY_RESULT(config, block::ConfigInfo::extract_config(
std::move(state), block::ConfigInfo::needPrevBlocks | block::ConfigInfo::needCapabilities));

for (auto i : params_) {
VLOG(last_config) << "ConfigParam(" << i << ") = ";
Expand Down
5 changes: 2 additions & 3 deletions validator/db/files-async.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ class WriteFile : public td::actor::Actor {
: tmp_dir_(tmp_dir), new_name_(new_name), promise_(std::move(promise)) {
write_data_ = [data_ptr = std::make_shared<td::BufferSlice>(std::move(data))] (td::FileFd& fd) {
auto data = std::move(*data_ptr);
td::uint64 offset = 0;
while (data.size() > 0) {
TRY_RESULT(s, fd.pwrite(data.as_slice(), offset));
offset += s;
auto piece_size = std::min<size_t>(data.size(), 1 << 30);
TRY_RESULT(s, fd.write(data.as_slice().substr(0, piece_size)));
data.confirm_read(s);
}
return td::Status::OK();
Expand Down

0 comments on commit 66b98b6

Please sign in to comment.