mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Optimization of persistent state serialization (#364)
* Fix double serialization of masterchain; increase sync_blocks_before * Improve logging in DownloadState * Write persistent state directly to file instead of a buffer * Don't keep ref to masterchain state in AsyncStateSerializer * Sparse state serialization over longer period Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
56f0293650
commit
c07394aab5
22 changed files with 327 additions and 84 deletions
|
@ -680,6 +680,13 @@ void ValidatorManagerImpl::store_persistent_state_file(BlockIdExt block_id, Bloc
|
|||
std::move(promise));
|
||||
}
|
||||
|
||||
void ValidatorManagerImpl::store_persistent_state_file_gen(BlockIdExt block_id, BlockIdExt masterchain_block_id,
|
||||
std::function<td::Status(td::FileFd&)> write_data,
|
||||
td::Promise<td::Unit> promise) {
|
||||
td::actor::send_closure(db_, &Db::store_persistent_state_file_gen, block_id, masterchain_block_id,
|
||||
std::move(write_data), std::move(promise));
|
||||
}
|
||||
|
||||
void ValidatorManagerImpl::store_zero_state_file(BlockIdExt block_id, td::BufferSlice state,
|
||||
td::Promise<td::Unit> promise) {
|
||||
td::actor::send_closure(db_, &Db::store_zero_state_file, block_id, std::move(state), std::move(promise));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue