From e5c4f9e37d8b5b312fcf00ba700e1238ef0a3492 Mon Sep 17 00:00:00 2001 From: Marat S Date: Fri, 28 Feb 2025 22:33:33 +0000 Subject: [PATCH] std_boc_serialize_to_file_large -> boc_serialize_to_file_large --- crypto/test/test-db.cpp | 2 +- crypto/vm/boc.h | 2 +- crypto/vm/large-boc-serializer.cpp | 2 +- validator/state-serializer.cpp | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crypto/test/test-db.cpp b/crypto/test/test-db.cpp index e61174ff..8b6dc28a 100644 --- a/crypto/test/test-db.cpp +++ b/crypto/test/test-db.cpp @@ -2315,7 +2315,7 @@ TEST(TonDb, LargeBocSerializer) { td::unlink(path).ignore(); fd = td::FileFd::open(path, td::FileFd::Flags::Create | td::FileFd::Flags::Truncate | td::FileFd::Flags::Write) .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(); auto b = td::read_file_str(path).move_as_ok(); diff --git a/crypto/vm/boc.h b/crypto/vm/boc.h index ff580050..503438f7 100644 --- a/crypto/vm/boc.h +++ b/crypto/vm/boc.h @@ -397,7 +397,7 @@ td::Result std_boc_serialize_multi(std::vector> root, td::Status std_boc_serialize_to_file(Ref root, td::FileFd& fd, int mode = 0, td::CancellationToken cancellation_token = {}); -td::Status std_boc_serialize_to_file_large(std::shared_ptr reader, Cell::Hash root_hash, td::FileFd& fd, +td::Status boc_serialize_to_file_large(std::shared_ptr reader, Cell::Hash root_hash, td::FileFd& fd, int mode = 0, td::CancellationToken cancellation_token = {}); } // namespace vm diff --git a/crypto/vm/large-boc-serializer.cpp b/crypto/vm/large-boc-serializer.cpp index 069611e0..839e6235 100644 --- a/crypto/vm/large-boc-serializer.cpp +++ b/crypto/vm/large-boc-serializer.cpp @@ -531,7 +531,7 @@ td::Status LargeBocSerializer::serialize(td::FileFd& fd, int mode) { } } // namespace -td::Status std_boc_serialize_to_file_large(std::shared_ptr reader, Cell::Hash root_hash, td::FileFd& fd, +td::Status boc_serialize_to_file_large(std::shared_ptr reader, Cell::Hash root_hash, td::FileFd& fd, int mode, td::CancellationToken cancellation_token) { td::Timer timer; CHECK(reader != nullptr) diff --git a/validator/state-serializer.cpp b/validator/state-serializer.cpp index 38f64e12..aa979234 100644 --- a/validator/state-serializer.cpp +++ b/validator/state-serializer.cpp @@ -395,7 +395,7 @@ void AsyncStateSerializer::got_masterchain_state(td::Ref state previous_state_cache->prepare_cache(shard); } auto new_cell_db_reader = std::make_shared(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(); return res; }; @@ -460,7 +460,7 @@ void AsyncStateSerializer::got_shard_state(BlockHandle handle, td::Refprepare_cache(shard); } auto new_cell_db_reader = std::make_shared(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(); return res; };