mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
std_boc_serialize_to_file_large -> boc_serialize_to_file_large
This commit is contained in:
parent
bc3fc8966f
commit
e5c4f9e37d
4 changed files with 5 additions and 5 deletions
|
@ -2315,7 +2315,7 @@ TEST(TonDb, LargeBocSerializer) {
|
||||||
td::unlink(path).ignore();
|
td::unlink(path).ignore();
|
||||||
fd = td::FileFd::open(path, td::FileFd::Flags::Create | td::FileFd::Flags::Truncate | td::FileFd::Flags::Write)
|
fd = td::FileFd::open(path, td::FileFd::Flags::Create | td::FileFd::Flags::Truncate | td::FileFd::Flags::Write)
|
||||||
.move_as_ok();
|
.move_as_ok();
|
||||||
std_boc_serialize_to_file_large(dboc->get_cell_db_reader(), root->get_hash(), fd, 31);
|
boc_serialize_to_file_large(dboc->get_cell_db_reader(), root->get_hash(), fd, 31);
|
||||||
fd.close();
|
fd.close();
|
||||||
auto b = td::read_file_str(path).move_as_ok();
|
auto b = td::read_file_str(path).move_as_ok();
|
||||||
|
|
||||||
|
|
|
@ -397,7 +397,7 @@ td::Result<td::BufferSlice> std_boc_serialize_multi(std::vector<Ref<Cell>> root,
|
||||||
|
|
||||||
td::Status std_boc_serialize_to_file(Ref<Cell> root, td::FileFd& fd, int mode = 0,
|
td::Status std_boc_serialize_to_file(Ref<Cell> root, td::FileFd& fd, int mode = 0,
|
||||||
td::CancellationToken cancellation_token = {});
|
td::CancellationToken cancellation_token = {});
|
||||||
td::Status std_boc_serialize_to_file_large(std::shared_ptr<CellDbReader> reader, Cell::Hash root_hash, td::FileFd& fd,
|
td::Status boc_serialize_to_file_large(std::shared_ptr<CellDbReader> reader, Cell::Hash root_hash, td::FileFd& fd,
|
||||||
int mode = 0, td::CancellationToken cancellation_token = {});
|
int mode = 0, td::CancellationToken cancellation_token = {});
|
||||||
|
|
||||||
} // namespace vm
|
} // namespace vm
|
||||||
|
|
|
@ -531,7 +531,7 @@ td::Status LargeBocSerializer::serialize(td::FileFd& fd, int mode) {
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
td::Status std_boc_serialize_to_file_large(std::shared_ptr<CellDbReader> reader, Cell::Hash root_hash, td::FileFd& fd,
|
td::Status boc_serialize_to_file_large(std::shared_ptr<CellDbReader> reader, Cell::Hash root_hash, td::FileFd& fd,
|
||||||
int mode, td::CancellationToken cancellation_token) {
|
int mode, td::CancellationToken cancellation_token) {
|
||||||
td::Timer timer;
|
td::Timer timer;
|
||||||
CHECK(reader != nullptr)
|
CHECK(reader != nullptr)
|
||||||
|
|
|
@ -395,7 +395,7 @@ void AsyncStateSerializer::got_masterchain_state(td::Ref<MasterchainState> state
|
||||||
previous_state_cache->prepare_cache(shard);
|
previous_state_cache->prepare_cache(shard);
|
||||||
}
|
}
|
||||||
auto new_cell_db_reader = std::make_shared<CachedCellDbReader>(cell_db_reader, previous_state_cache->cache);
|
auto new_cell_db_reader = std::make_shared<CachedCellDbReader>(cell_db_reader, previous_state_cache->cache);
|
||||||
auto res = vm::std_boc_serialize_to_file_large(new_cell_db_reader, root->get_hash(), fd, 31, std::move(cancellation_token));
|
auto res = vm::boc_serialize_to_file_large(new_cell_db_reader, root->get_hash(), fd, 31, std::move(cancellation_token));
|
||||||
new_cell_db_reader->print_stats();
|
new_cell_db_reader->print_stats();
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
@ -460,7 +460,7 @@ void AsyncStateSerializer::got_shard_state(BlockHandle handle, td::Ref<ShardStat
|
||||||
previous_state_cache->prepare_cache(shard);
|
previous_state_cache->prepare_cache(shard);
|
||||||
}
|
}
|
||||||
auto new_cell_db_reader = std::make_shared<CachedCellDbReader>(cell_db_reader, previous_state_cache->cache);
|
auto new_cell_db_reader = std::make_shared<CachedCellDbReader>(cell_db_reader, previous_state_cache->cache);
|
||||||
auto res = vm::std_boc_serialize_to_file_large(new_cell_db_reader, root->get_hash(), fd, 31, std::move(cancellation_token));
|
auto res = vm::boc_serialize_to_file_large(new_cell_db_reader, root->get_hash(), fd, 31, std::move(cancellation_token));
|
||||||
new_cell_db_reader->print_stats();
|
new_cell_db_reader->print_stats();
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue