mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
slightly changed block format
- small change in block format - added config in blockchain explorer - bugfixes
This commit is contained in:
parent
7f3a22a217
commit
090e0c16eb
82 changed files with 1852 additions and 391 deletions
|
@ -48,7 +48,7 @@ class ArchiveManager : public td::actor::Actor {
|
|||
void get_key_block_proof(FileReference ref_id, td::Promise<td::BufferSlice> promise);
|
||||
void get_temp_file_short(FileReference ref_id, td::Promise<td::BufferSlice> promise);
|
||||
void get_file_short(FileReference ref_id, td::Promise<td::BufferSlice> promise);
|
||||
void get_file(BlockHandle handle, FileReference ref_id, td::Promise<td::BufferSlice> promise);
|
||||
void get_file(ConstBlockHandle handle, FileReference ref_id, td::Promise<td::BufferSlice> promise);
|
||||
|
||||
void add_zero_state(BlockIdExt block_id, td::BufferSlice data, td::Promise<td::Unit> promise);
|
||||
void add_persistent_state(BlockIdExt block_id, BlockIdExt masterchain_block_id, td::BufferSlice data,
|
||||
|
@ -60,12 +60,15 @@ class ArchiveManager : public td::actor::Actor {
|
|||
void check_persistent_state(BlockIdExt block_id, BlockIdExt masterchain_block_id, td::Promise<bool> promise);
|
||||
void check_zero_state(BlockIdExt block_id, td::Promise<bool> promise);
|
||||
|
||||
//void truncate(BlockSeqno masterchain_seqno, td::Promise<td::Unit> promise);
|
||||
//void truncate_continue(BlockSeqno masterchain_seqno, td::Promise<td::Unit> promise);
|
||||
|
||||
void run_gc(UnixTime ts);
|
||||
|
||||
/* from LTDB */
|
||||
void get_block_by_unix_time(AccountIdPrefixFull account_id, UnixTime ts, td::Promise<BlockHandle> promise);
|
||||
void get_block_by_lt(AccountIdPrefixFull account_id, LogicalTime lt, td::Promise<BlockHandle> promise);
|
||||
void get_block_by_seqno(AccountIdPrefixFull account_id, BlockSeqno seqno, td::Promise<BlockHandle> promise);
|
||||
void get_block_by_unix_time(AccountIdPrefixFull account_id, UnixTime ts, td::Promise<ConstBlockHandle> promise);
|
||||
void get_block_by_lt(AccountIdPrefixFull account_id, LogicalTime lt, td::Promise<ConstBlockHandle> promise);
|
||||
void get_block_by_seqno(AccountIdPrefixFull account_id, BlockSeqno seqno, td::Promise<ConstBlockHandle> promise);
|
||||
|
||||
void get_archive_id(BlockSeqno masterchain_seqno, td::Promise<td::uint64> promise);
|
||||
void get_archive_slice(td::uint64 archive_id, td::uint64 offset, td::uint32 limit,
|
||||
|
@ -77,6 +80,13 @@ class ArchiveManager : public td::actor::Actor {
|
|||
void commit_transaction();
|
||||
void set_async_mode(bool mode, td::Promise<td::Unit> promise);
|
||||
|
||||
static constexpr td::uint32 archive_size() {
|
||||
return 20000;
|
||||
}
|
||||
static constexpr td::uint32 key_archive_size() {
|
||||
return 200000;
|
||||
}
|
||||
|
||||
private:
|
||||
struct FileDescription {
|
||||
struct Desc {
|
||||
|
@ -113,8 +123,8 @@ class ArchiveManager : public td::actor::Actor {
|
|||
std::map<FileHash, FileReferenceShort> perm_states_;
|
||||
|
||||
void load_package(PackageId seqno);
|
||||
void delete_package(PackageId seqno);
|
||||
void deleted_package(PackageId seqno);
|
||||
void delete_package(PackageId seqno, td::Promise<td::Unit> promise);
|
||||
void deleted_package(PackageId seqno, td::Promise<td::Unit> promise);
|
||||
void get_handle_cont(BlockIdExt block_id, PackageId id, td::Promise<BlockHandle> promise);
|
||||
void get_handle_finish(BlockHandle handle, td::Promise<BlockHandle> promise);
|
||||
void get_file_short_cont(FileReference ref_id, PackageId idx, td::Promise<td::BufferSlice> promise);
|
||||
|
@ -129,6 +139,7 @@ class ArchiveManager : public td::actor::Actor {
|
|||
FileDescription *get_file_desc_by_seqno(AccountIdPrefixFull shard, BlockSeqno seqno, bool key_block);
|
||||
FileDescription *get_file_desc_by_lt(AccountIdPrefixFull shard, LogicalTime lt, bool key_block);
|
||||
FileDescription *get_file_desc_by_unix_time(AccountIdPrefixFull shard, UnixTime ts, bool key_block);
|
||||
FileDescription *get_next_file_desc(FileDescription *f);
|
||||
FileDescription *get_temp_file_desc_by_idx(PackageId idx);
|
||||
PackageId get_max_temp_file_desc_idx();
|
||||
PackageId get_prev_temp_file_desc_idx(PackageId id);
|
||||
|
@ -136,7 +147,7 @@ class ArchiveManager : public td::actor::Actor {
|
|||
void written_perm_state(FileReferenceShort id);
|
||||
|
||||
void persistent_state_gc(FileHash last);
|
||||
void got_gc_masterchain_handle(BlockHandle handle, FileHash hash);
|
||||
void got_gc_masterchain_handle(ConstBlockHandle handle, FileHash hash);
|
||||
|
||||
std::string db_root_;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue