mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Merge branch 'testnet' into block-generation
This commit is contained in:
commit
66b98b6d6a
2 changed files with 4 additions and 4 deletions
|
@ -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(),
|
TRY_RESULT(state, block::check_extract_state_proof(blkid, raw_config->state_proof_.as_slice(),
|
||||||
raw_config->config_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_) {
|
for (auto i : params_) {
|
||||||
VLOG(last_config) << "ConfigParam(" << i << ") = ";
|
VLOG(last_config) << "ConfigParam(" << i << ") = ";
|
||||||
|
|
|
@ -82,10 +82,9 @@ class WriteFile : public td::actor::Actor {
|
||||||
: tmp_dir_(tmp_dir), new_name_(new_name), promise_(std::move(promise)) {
|
: 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) {
|
write_data_ = [data_ptr = std::make_shared<td::BufferSlice>(std::move(data))] (td::FileFd& fd) {
|
||||||
auto data = std::move(*data_ptr);
|
auto data = std::move(*data_ptr);
|
||||||
td::uint64 offset = 0;
|
|
||||||
while (data.size() > 0) {
|
while (data.size() > 0) {
|
||||||
TRY_RESULT(s, fd.pwrite(data.as_slice(), offset));
|
auto piece_size = std::min<size_t>(data.size(), 1 << 30);
|
||||||
offset += s;
|
TRY_RESULT(s, fd.write(data.as_slice().substr(0, piece_size)));
|
||||||
data.confirm_read(s);
|
data.confirm_read(s);
|
||||||
}
|
}
|
||||||
return td::Status::OK();
|
return td::Status::OK();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue